diff --git a/README.md b/README.md
index 3b953f86..21b92fe5 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
--
-
+
@@ -11,7 +11,9 @@
## 置顶消息:
-Q群:490442439, 2群:761899104, 验证信息:jzvd, 微信公众号:jzvdjzt,微信:lipanhelloworld,QQ:1066666651,[Telegram](https://t.me/jiaozitoken),[Weibo](http://weibo.com/2342820395/profile?topnav=1&wvr=6&is_all=1),[公众号文章](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E5%85%AC%E4%BC%97%E5%8F%B7%E6%96%87%E7%AB%A0)
+群主微信进饺子粉丝群,沟通重心从Q群转移到微信群。微信:lipanhelloworld备注JZVD,Q群:490442439, 2群:761899104, 验证信息:jzvd, 微信公众号:jzvdjzt,QQ:1066666651,[Telegram](https://t.me/jiaozitoken),[Weibo](http://weibo.com/2342820395/profile?topnav=1&wvr=6&is_all=1),[公众号文章](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E5%85%AC%E4%BC%97%E5%8F%B7%E6%96%87%E7%AB%A0)
+
+
为了增加项目质量,促进项目进度,调用社群力量,方便社群管理,推出基于以太坊ERC-20的数字通证[JiaoZiToken(JZT)(饺子Token)](https://github.com/JZVD/JZT),必定大有可为。
@@ -37,7 +39,7 @@ Q群:490442439, 2群:761899104, 验证信息:jzvd, 微信公众号:jzvdjzt,微
## 文档
-- [文档 - API](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-API),下载安装demo[jiaozivideoplayer-7.2.1.apk](https://github.com/Jzvd/JiaoZiVideoPlayer/releases/download/v7.2.1/jiaozivideoplayer-7.2.1.apk),仔细过一遍demo
+- [文档 - API](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-API),下载安装demo[jiaozivideoplayer-7.2.2.apk](https://github.com/Jzvd/JiaoZiVideoPlayer/releases/download/v7.2.2/jiaozivideoplayer-7.2.2.apk),仔细过一遍demo
- [文档 - 自定义Jzvd](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-%E8%87%AA%E5%AE%9A%E4%B9%89Jzvd),继承JzvdStd实现自己的播放器
- [文档 - 自定义播放内核](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-%E8%87%AA%E5%AE%9A%E4%B9%89%E6%92%AD%E6%94%BE%E5%86%85%E6%A0%B8),测试哪个播放内核适合自己的项目
@@ -45,13 +47,13 @@ Q群:490442439, 2群:761899104, 验证信息:jzvd, 微信公众号:jzvdjzt,微
-
+
## QuickStart
1.添加类库
```gradle
-compile 'cn.jzvd:jiaozivideoplayer:7.2.1'
+compile 'cn.jzvd:jiaozivideoplayer:7.2.2'
```
2.添加布局
@@ -71,7 +73,7 @@ compile 'cn.jzvd:jiaozivideoplayer:7.2.1'
MyJzvdStd jzvdStd = (MyJzvdStd) findViewById(R.id.jz_video);
jzvdStd.setUp("http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
, "饺子闭眼睛");
-jzvdStd.thumbImageView.setImage("http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640");
+jzvdStd.posterImageView.setImage("http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640");
```
4.在`Activity`中
diff --git a/app/build.gradle b/app/build.gradle
index 5ed1ff7d..4d64f720 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -7,8 +7,8 @@ android {
applicationId "cn.jzvd.demo"
minSdkVersion 16
targetSdkVersion 29
- versionCode 96
- versionName "7.2.1"
+ versionCode 97
+ versionName "7.2.2"
ndk {
// add support lib
abiFilters 'armeabi-v7a' //, 'arm64-v8a'//, "mips" //,'armeabi''x86',, 'x86_64',
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index dd7d4735..b728ed8f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -99,6 +99,7 @@
ViewConfiguration.get(getContext()).getScaledTouchSlop() && Math.abs(Math.abs(event.getY() - startY)) > ViewConfiguration.get(getContext()).getScaledTouchSlop()
+ if (event.getX() == starX || event.getY() == startY) {
+ startDismissControlViewTimer();
+ onClickUiToggle();
+ bottomProgressBar.setVisibility(VISIBLE);
+ }
+ return true;
+ }
+ break;
+ }
+ return super.onTouch(v, event);
+ }
+
+
+ @Override
+ public void init(Context context) {
+ super.init(context);
+ lockIv = findViewById(R.id.lock);
+ lockIv.setOnClickListener(this);
+ }
+
+
+
+ @Override
+ public void onClickUiToggle() {
+ super.onClickUiToggle();
+ if (screen == SCREEN_FULLSCREEN) {
+ if (!isLockScreen) {
+ if (bottomContainer.getVisibility() == View.VISIBLE) {
+ lockIv.setVisibility(View.VISIBLE);
+ } else {
+ lockIv.setVisibility(View.GONE);
+ }
+ } else {
+ if ((int) lockIv.getTag() == 1) {
+ bottomProgressBar.setVisibility(GONE);
+ if (lockIv.getVisibility() == View.GONE) {
+ lockIv.setVisibility(View.VISIBLE);
+ } else {
+ lockIv.setVisibility(View.GONE);
+ }
+
+ }
+ }
+
+ }
+ }
+
+ @Override
+ public void changeUiToPauseShow() {
+ super.changeUiToPauseShow();
+ if (isLockScreen) {
+ bottomContainer.setVisibility(GONE);
+ topContainer.setVisibility(GONE);
+ startButton.setVisibility(GONE);
+ }
+ }
+
+ @Override
+ public void setScreenFullscreen() {
+ super.setScreenFullscreen();
+ lockIv.setBackgroundResource(R.mipmap.unlock);
+ lockIv.setVisibility(View.VISIBLE);
+ }
+
+ @Override
+ public void dissmissControlView() {
+ super.dissmissControlView();
+ post(() -> {
+ if (screen == SCREEN_FULLSCREEN) {
+ lockIv.setVisibility(View.GONE);
+ bottomProgressBar.setVisibility(View.GONE);
+ }
+ });
+ }
+
+ @Override
+ public void changeUiToPlayingShow() {
+ super.changeUiToPlayingShow();
+ if (screen == SCREEN_FULLSCREEN) {
+ bottomProgressBar.setVisibility(GONE);
+ if (isLockScreen) {
+ topContainer.setVisibility(GONE);
+ bottomContainer.setVisibility(GONE);
+ startButton.setVisibility(GONE);
+ } else {
+ topContainer.setVisibility(VISIBLE);
+ bottomContainer.setVisibility(VISIBLE);
+ startButton.setVisibility(VISIBLE);
+ }
+ }
+ }
+
+ @Override
+ public void changeUiToPlayingClear() {
+ super.changeUiToPlayingClear();
+ if (screen == SCREEN_FULLSCREEN) {
+ bottomProgressBar.setVisibility(GONE);
+ lockIv.setVisibility(View.GONE);
+ }
+ }
+
+
+ @Override
+ public void setScreenNormal() {
+ super.setScreenNormal();
+ lockIv.setVisibility(View.GONE);
+ }
+
+ @Override
+ public int getLayoutId() {
+ return R.layout.lock_screen_jz_layout_std;
+ }
+
+
+ @Override
+ public void onClick(View v) {
+ super.onClick(v);
+ switch (v.getId()) {
+ case R.id.lock:
+ if (screen == SCREEN_FULLSCREEN) {
+ lockIv.setTag(1);
+ if (!isLockScreen) {
+ isLockScreen = true;
+ JZUtils.setRequestedOrientation(getContext(), ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
+ lockIv.setBackgroundResource(R.mipmap.lock);
+ dissmissControlView();
+ } else {
+ JZUtils.setRequestedOrientation(getContext(), ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
+ isLockScreen = false;
+ lockIv.setBackgroundResource(R.mipmap.unlock);
+ bottomContainer.setVisibility(VISIBLE);
+ bottomProgressBar.setVisibility(GONE);
+ topContainer.setVisibility(VISIBLE);
+ startButton.setVisibility(VISIBLE);
+ }
+ }
+ break;
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdMp3.java b/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdMp3.java
index cee65631..bf4fa7e7 100644
--- a/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdMp3.java
+++ b/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdMp3.java
@@ -27,7 +27,7 @@ public int getLayoutId() {
@Override
public void onClick(View v) {
- if (v.getId() == cn.jzvd.R.id.thumb &&
+ if (v.getId() == cn.jzvd.R.id.poster &&
(state == STATE_PLAYING ||
state == STATE_PAUSE)) {
onClickUiToggle();
@@ -52,26 +52,26 @@ public void changeUiToPreparing() {
@Override
public void changeUiToPlayingShow() {
super.changeUiToPlayingShow();
- thumbImageView.setVisibility(View.VISIBLE);
+ posterImageView.setVisibility(View.VISIBLE);
}
@Override
public void changeUiToPlayingClear() {
super.changeUiToPlayingClear();
- thumbImageView.setVisibility(View.VISIBLE);
+ posterImageView.setVisibility(View.VISIBLE);
}
@Override
public void changeUiToPauseShow() {
super.changeUiToPauseShow();
- thumbImageView.setVisibility(View.VISIBLE);
+ posterImageView.setVisibility(View.VISIBLE);
}
@Override
public void changeUiToPauseClear() {
super.changeUiToPauseClear();
- thumbImageView.setVisibility(View.VISIBLE);
+ posterImageView.setVisibility(View.VISIBLE);
}
@Override
diff --git a/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTextureViewAfterAutoComplete.java b/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTextureViewAfterAutoComplete.java
index 7c4e2d79..f7400a90 100644
--- a/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTextureViewAfterAutoComplete.java
+++ b/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTextureViewAfterAutoComplete.java
@@ -22,7 +22,7 @@ public JzvdStdShowTextureViewAfterAutoComplete(Context context, AttributeSet att
@Override
public void onAutoCompletion() {
super.onAutoCompletion();
- thumbImageView.setVisibility(View.GONE);
+ posterImageView.setVisibility(View.GONE);
}
}
diff --git a/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdTikTok.java b/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdTikTok.java
index f43a7fa4..9ee5f093 100644
--- a/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdTikTok.java
+++ b/app/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdTikTok.java
@@ -3,9 +3,11 @@
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
+import android.view.View;
import android.widget.ImageView;
import cn.jzvd.JzvdStd;
+import cn.jzvd.demo.R;
public class JzvdStdTikTok extends JzvdStd {
public JzvdStdTikTok(Context context) {
@@ -21,8 +23,8 @@ public void init(Context context) {
super.init(context);
bottomContainer.setVisibility(GONE);
topContainer.setVisibility(GONE);
- bottomProgressBar.setVisibility(VISIBLE);
- thumbImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
+ bottomProgressBar.setVisibility(GONE);
+ posterImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
}
@@ -35,43 +37,36 @@ public void changeUiToNormal() {
}
@Override
- public void changeUiToPreparing() {
- super.changeUiToPreparing();
+ public void setAllControlsVisiblity(int topCon, int bottomCon, int startBtn, int loadingPro,
+ int posterImg, int bottomPro, int retryLayout) {
+ topContainer.setVisibility(topCon);
+ bottomContainer.setVisibility(bottomCon);
+ startButton.setVisibility(startBtn);
+ loadingProgressBar.setVisibility(loadingPro);
+ posterImageView.setVisibility(posterImg);
+ bottomProgressBar.setVisibility(GONE);
+ mRetryLayout.setVisibility(retryLayout);
}
@Override
- public void changeUiToPlayingShow() {
- super.changeUiToPlayingShow();
- bottomProgressBar.setVisibility(VISIBLE);
+ public void dissmissControlView() {
+ if (state != STATE_NORMAL
+ && state != STATE_ERROR
+ && state != STATE_AUTO_COMPLETE) {
+ post(() -> {
+ bottomContainer.setVisibility(View.INVISIBLE);
+ topContainer.setVisibility(View.INVISIBLE);
+ startButton.setVisibility(View.INVISIBLE);
+ if (clarityPopWindow != null) {
+ clarityPopWindow.dismiss();
+ }
+ if (screen != SCREEN_TINY) {
+ bottomProgressBar.setVisibility(View.GONE);
+ }
+ });
+ }
}
- @Override
- public void changeUiToPlayingClear() {
- super.changeUiToPlayingClear();
- bottomProgressBar.setVisibility(VISIBLE);
- }
-
- @Override
- public void changeUiToPauseShow() {
- super.changeUiToPauseShow();
- bottomProgressBar.setVisibility(VISIBLE);
- }
-
- @Override
- public void changeUiToPauseClear() {
- super.changeUiToPauseClear();
- bottomProgressBar.setVisibility(VISIBLE);
- }
-
- @Override
- public void changeUiToComplete() {
- super.changeUiToComplete();
- }
-
- @Override
- public void changeUiToError() {
- super.changeUiToError();
- }
@Override
public void onClickUiToggle() {
@@ -80,6 +75,23 @@ public void onClickUiToggle() {
startButton.performClick();
bottomContainer.setVisibility(GONE);
topContainer.setVisibility(GONE);
- bottomProgressBar.setVisibility(VISIBLE);
+ }
+
+ public void updateStartImage() {
+ if (state == STATE_PLAYING) {
+ startButton.setVisibility(VISIBLE);
+ startButton.setImageResource(R.drawable.ic_play_tiktok);
+ replayTextView.setVisibility(GONE);
+ } else if (state == STATE_ERROR) {
+ startButton.setVisibility(INVISIBLE);
+ replayTextView.setVisibility(GONE);
+ } else if (state == STATE_AUTO_COMPLETE) {
+ startButton.setVisibility(VISIBLE);
+ startButton.setImageResource(R.drawable.ic_play_tiktok);
+ replayTextView.setVisibility(VISIBLE);
+ } else {
+ startButton.setImageResource(R.drawable.ic_play_tiktok);
+ replayTextView.setVisibility(GONE);
+ }
}
}
diff --git a/app/src/main/java/cn/jzvd/demo/FragmentDemo.java b/app/src/main/java/cn/jzvd/demo/FragmentDemo.java
index 7177ea14..ac2561e2 100644
--- a/app/src/main/java/cn/jzvd/demo/FragmentDemo.java
+++ b/app/src/main/java/cn/jzvd/demo/FragmentDemo.java
@@ -37,7 +37,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
listView.setAdapter(new AdapterListView(getActivity(),
VideoConstant.videoUrls[index],
VideoConstant.videoTitles[index],
- VideoConstant.videoThumbs[index]));
+ VideoConstant.videoPosters[index]));
listView.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
diff --git a/app/src/main/java/cn/jzvd/demo/VideoConstant.java b/app/src/main/java/cn/jzvd/demo/VideoConstant.java
index 77342738..9950ee6a 100644
--- a/app/src/main/java/cn/jzvd/demo/VideoConstant.java
+++ b/app/src/main/java/cn/jzvd/demo/VideoConstant.java
@@ -16,7 +16,7 @@ public class VideoConstant {
"http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
};
- public static String[] videoThumbList =
+ public static String[] videoPosterList =
{
"http://jzvd-pic.nathen.cn/jzvd-pic/00b026e7-b830-4994-bc87-38f4033806a6.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/1d935cc5-a1e7-4779-bdfa-20fd7a60724c.jpg",
@@ -52,10 +52,153 @@ public class VideoConstant {
"http://jzvd.nathen.cn/d525f756aabf4b0588c2152fb94e07f5/d9f59bef829a472a9ca066620d9b871a-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/6e2fdec45dfa44a6802e95f8e4bc3280/a6a5273ac4244333923991be0583ffc7-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/22b4de0e2b1245959c5baa77fe0bf14e/896a137559084b7eb879f5441faff20d-5287d2089db37e62345123a1be272f8b.mp4"
+ },
+ {//tiktok
+ "http://jzvd.nathen.cn/video/1137e480-170bac9c523-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/e0bd348-170bac9c3b8-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/7bf938c-170bac9c18a-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2f03c005-170bac9abac-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/47788f38-170bac9ab8a-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2d6ffe8f-170bac9ab87-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/633e0ce-170bac9ab65-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2d6ffe8f-170bac9ab87-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/51f7552c-170bac98718-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2a101070-170bad88892-0007-1823-c86-de200.mp4"
}
};
- public static String[][] videoThumbs =
+ public static String[] ssVideos = {
+ //0
+ "http://jzvd.nathen.cn/video/4542c17b-170c25a8e14-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/5ab693c5-170c25a8e2b-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/375dd5c6-170c25a8e44-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/51e8b629-170c25a8e61-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/1fbd7323-170c25a8e7c-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/3697e6a5-170c5a17543-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/3697e6a5-170c5a17543-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/23755490-170c5a23aa2-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/3485af57-170c5a23b57-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/4c40d283-170c5a23bbe-0007-1823-c86-de200.mp4",
+//1
+ "http://jzvd.nathen.cn/video/33a3d257-170c5a23c2b-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2aa00271-170c0924702-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/544973c7-170c092471a-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/4da19896-170c092473b-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/3e6b7f3a-170c0924763-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/8c1d8d9-170c0924776-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/3ed29468-170c099b43f-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/3f52bb8f-170c099f9ab-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/1248915c-170c09a1ce6-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/1c6529ed-170c09a2468-0007-1823-c86-de200.mp4",
+//2
+ "http://jzvd.nathen.cn/video/53e65db2-170c09a6c1d-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/11131240-170c5b076c4-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/5d6f2372-170c09b3ae0-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/5cc9b365-170c5b076d8-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/13ef1d98-170c09b3b9a-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2f795df7-170c09b3bed-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/4b76aaac-170c09b3c8f-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/3bad72f7-170c09dc89f-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/581fbe-170c09dee3f-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2aed5c6f-170c09dfbc3-0007-1823-c86-de200.mp4",
+//3
+ "http://jzvd.nathen.cn/video/3c0038bd-170c0a06ca0-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/15cace49-170c0a075f7-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/ed1d3ef-170c0a078cd-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/1fe7adc2-170c0afd71a-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2c1d36cc-170c0afd12c-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2083feba-170c0afd719-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/39105916-170c0afd718-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2bc8f057-170c0afd716-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2b8e9a15-170c0afd71c-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/43a91267-170c0afd719-0007-1823-c86-de200.mp4",
+//4
+ "http://jzvd.nathen.cn/video/33d5835a-170c0afd717-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/259ea2dd-170c0b41b5d-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/4e82a1ea-170c5bc6941-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/460bad24-170c5bc6956-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/5a2bc514-170c261eff0-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/11b3c81-170c261eff3-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/47d75a32-170c0b41c2b-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/10a5d0f8-170c261f25b-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/52cb5649-170c261f720-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/31f18965-170c2621a73-0007-1823-c86-de200.mp4",
+//5
+ "http://jzvd.nathen.cn/video/4a7b4838-170c267601a-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/554fe55-170c26772b4-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/31dbfe8e-170c2677478-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/30ab99b5-170c2677ca8-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/3acdb082-170c26793c3-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/4bf014a5-170c26aed4b-0007-1823-c86-de200.mp4",
+ "http://jzvd.nathen.cn/video/2f74432d-170c26afad2-0007-1823-c86-de200.mp4"
+ };
+ public static String[] ssPoster = {
+ "http://jzvd.nathen.cn/snapshot/f402a0e012b14d41ad07939746844c5e00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/4105cf36b9b8463ea9151c6ad73717d900005.jpg",
+ "http://jzvd.nathen.cn/snapshot/1ae064966b8b423887af71c3eba3bca100005.jpg",
+ "http://jzvd.nathen.cn/snapshot/4061ba7b7005452e81b643580eb4d30200005.jpg",
+ "http://jzvd.nathen.cn/snapshot/d7505ea52bca48828807bcf96161a9f500005.jpg",
+ "http://jzvd.nathen.cn/snapshot/9787cbe40b7848e9b82d2cc12d1c943500005.jpg",
+ "http://jzvd.nathen.cn/snapshot/9787cbe40b7848e9b82d2cc12d1c943500005.jpg",
+ "http://jzvd.nathen.cn/snapshot/1a78739a54de4575b7cec1d77a8df4a000005.jpg",
+ "http://jzvd.nathen.cn/snapshot/ef29b1922ea64780a8e77a5676cad95700005.jpg",
+ "http://jzvd.nathen.cn/snapshot/dabe6ca3c71942fd926a86c8996d750f00005.jpg",
+//1
+ "http://jzvd.nathen.cn/snapshot/14e8861d87c248ad83704dbe99b969f300005.jpg",
+ "http://jzvd.nathen.cn/snapshot/8bd6d06878fc4676a62290cbe8b5511f00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/7254150df078451585464d804d42c71a00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/c1ff75fcfd0042c4b7ecb762c13884eb00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/4a5e4b468bce4179a9d97b4b40a80e0f00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/bbe6f26a9af34ff4aa5d0e7919bd1e2f00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/2a09ede3702c462db4f0fc8eb56821b700005.jpg",
+ "http://jzvd.nathen.cn/snapshot/ba84ad1beddf4d699596537b5bbbdd4900005.jpg",
+ "http://jzvd.nathen.cn/snapshot/9f9f5372013d4494a9fabb1c7df770ba00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/732eb57fc0d447909eccc1adb60822c700005.jpg",
+//2
+ "http://jzvd.nathen.cn/snapshot/371ddcdf7bbe46b682913f3d3353192000005.jpg",
+ "http://jzvd.nathen.cn/snapshot/b0eae85eab344427b77a162a1f7c46ae00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/99bac3c2114545cf81cf66646c1e93af00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/b538b1feda4943ffbd84e84cab0a2fce00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/001ffec854be4c70a2baf3e9219705b100005.jpg",
+ "http://jzvd.nathen.cn/snapshot/eed4cbff7dce42a9ae2a54606be2573e00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/b9bf3204fd75493aacdb83ecb9cef71300005.jpg",
+ "http://jzvd.nathen.cn/snapshot/43b2946bc6f24451b7118dd3861378ab00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/43b2946bc6f24451b7118dd3861378ab00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/3fc3f273ea394ec7bb79b668360160f700005.jpg",
+ "http://jzvd.nathen.cn/snapshot/edac56544e2f43bb827bd0e819db381000005.jpg",
+//3
+ "http://jzvd.nathen.cn/snapshot/1d32b21e058b4959ba759e7385eb4c7000005.jpg",
+ "http://jzvd.nathen.cn/snapshot/6625cbf8306843dfb4fd636cf5b237a900005.jpg",
+ "http://jzvd.nathen.cn/snapshot/04cd0101be0c4b3f8f4f9b1f07b8a6bc00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/531f1e488eb84b898ae9ca7f6ba758ed00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/ca387d7d2ea8407aa371c3ce2d346a6d00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/858001d1e47f416b996eb04b60a4579700005.jpg",
+ "http://jzvd.nathen.cn/snapshot/397923c6af5a48fd981ee23fafe7095800005.jpg",
+ "http://jzvd.nathen.cn/snapshot/454c647c597340dc93a361f5bebfad4800005.jpg",
+ "http://jzvd.nathen.cn/snapshot/b3c23f24c04640aaa5a15b0ad6477e4700005.jpg",
+ "http://jzvd.nathen.cn/snapshot/7aafec2b6ce74b658cc6ea4268c492c500005.jpg",
+//4
+ "http://jzvd.nathen.cn/snapshot/48d7a9f34254467bb6a1bdc830a2469300005.jpg",
+ "http://jzvd.nathen.cn/snapshot/5ecbb98fda1347cd921c0534bbf5d0d300005.jpg",
+ "http://jzvd.nathen.cn/snapshot/c6bf92f63bea42d687b3a61d2c880d3200005.jpg",
+ "http://jzvd.nathen.cn/snapshot/ad0331e78393457d88ded2257d9e47c800005.jpg",
+ "http://jzvd.nathen.cn/snapshot/1f8acb2de146490e867b35f381f26f2900005.jpg",
+ "http://jzvd.nathen.cn/snapshot/0da5ed87cc1f4f4f9742b6fde232128d00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/2cf5412fe161439a835371ce0b42f64f00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/6ae53110f7fd470683587746f027698400005.jpg",
+ "http://jzvd.nathen.cn/snapshot/39cfa0b8eb0e4875ac0665448a09a9fa00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/f7622efa12d74d1f955bf4d8d6e8c5a400005.jpg",
+//5
+ "http://jzvd.nathen.cn/snapshot/ef384b95897b470c80a4aca4dd1112a500005.jpg",
+ "http://jzvd.nathen.cn/snapshot/8715f1267152404199f900fc72c6521700005.jpg",
+ "http://jzvd.nathen.cn/snapshot/86a055d08b514c9ca1e76e76862105ec00005.jpg",
+ "http://jzvd.nathen.cn/snapshot/58c16ac1e01e4a12b7970ecc8d6e789100005.jpg",
+ "http://jzvd.nathen.cn/snapshot/abd73471be8745d5b90c8fec34f95a7600005.jpg",
+ "http://jzvd.nathen.cn/snapshot/c9a2dbd1b997417687312741d2efe62300005.jpg",
+ "http://jzvd.nathen.cn/snapshot/f92487e92d6a4d3faad2d60375416c5200005.jpg"
+ };
+
+ public static String[][] videoPosters =
{
{
"http://jzvd-pic.nathen.cn/jzvd-pic/bd7ffc84-8407-4037-a078-7d922ce0fb0f.jpg",
@@ -80,6 +223,18 @@ public class VideoConstant {
"http://jzvd-pic.nathen.cn/jzvd-pic/d6d3a520-b183-4867-8746-5b6aba6c1724.png",
"http://jzvd-pic.nathen.cn/jzvd-pic/caa3dade-5744-486d-a1b7-9780aebb9eb5.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/2c3e62bb-6a32-4fb0-a1d5-d1260ad436a4.png"
+ },
+ {
+ "http://jzvd.nathen.cn/snapshot/5f1bf07d953d4e50989e99cb45ba6b5d00002.jpg",
+ "http://jzvd.nathen.cn/snapshot/c0d873f60f664bf6a90c9a69bdf52be900002.jpg",
+ "http://jzvd.nathen.cn/snapshot/c8598fcf365542a28be332c19d666ec600002.jpg",
+ "http://jzvd.nathen.cn/snapshot/f2e9d9cb796f420faa0903a28800660e00001.jpg",
+ "http://jzvd.nathen.cn/snapshot/b3bb3dd69c804993bbd155225b873bdf00002.jpg",
+ "http://jzvd.nathen.cn/snapshot/43902ca792e84b1b8bee65e28a75177200001.jpg",
+ "http://jzvd.nathen.cn/snapshot/e027c24371d84a6296d824dc7a7d0aa600002.jpg",
+ "http://jzvd.nathen.cn/snapshot/c904a0e5627f4a48982c7d09c5dc79ec00001.jpg",
+ "http://jzvd.nathen.cn/snapshot/b6eacc0aae6049afbcf7cb9365c7694200002.jpg",
+ "http://jzvd.nathen.cn/snapshot/717f9195bac04ea589692a3143aa04b400002.jpg"
}
};
diff --git a/app/src/main/java/cn/jzvd/demo/tiktok/ActivityTikTok.java b/app/src/main/java/cn/jzvd/demo/tiktok/ActivityTikTok.java
index 6e8cefc0..b5b7645d 100644
--- a/app/src/main/java/cn/jzvd/demo/tiktok/ActivityTikTok.java
+++ b/app/src/main/java/cn/jzvd/demo/tiktok/ActivityTikTok.java
@@ -72,7 +72,7 @@ public void onChildViewAttachedToWindow(View view) {
@Override
public void onChildViewDetachedFromWindow(View view) {
Jzvd jzvd = view.findViewById(R.id.videoplayer);
- if (jzvd != null && Jzvd.CURRENT_JZVD != null &&
+ if (jzvd != null && Jzvd.CURRENT_JZVD != null && jzvd.jzDataSource!=null&&
jzvd.jzDataSource.containsTheUrl(Jzvd.CURRENT_JZVD.jzDataSource.getCurrentUrl())) {
if (Jzvd.CURRENT_JZVD != null && Jzvd.CURRENT_JZVD.screen != Jzvd.SCREEN_FULLSCREEN) {
Jzvd.releaseAllVideos();
diff --git a/app/src/main/java/cn/jzvd/demo/tiktok/AdapterTikTokRecyclerView.java b/app/src/main/java/cn/jzvd/demo/tiktok/AdapterTikTokRecyclerView.java
index 6e806f56..98be6f6a 100644
--- a/app/src/main/java/cn/jzvd/demo/tiktok/AdapterTikTokRecyclerView.java
+++ b/app/src/main/java/cn/jzvd/demo/tiktok/AdapterTikTokRecyclerView.java
@@ -40,11 +40,11 @@ public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
public void onBindViewHolder(MyViewHolder holder, int position) {
Log.i(TAG, "onBindViewHolder [" + holder.jzvdStd.hashCode() + "] position=" + position);
- JZDataSource jzDataSource = new JZDataSource(VideoConstant.videoUrls[0][position],
+ JZDataSource jzDataSource = new JZDataSource(VideoConstant.videoUrls[3][position],
VideoConstant.videoTitles[0][position]);
jzDataSource.looping = true;
holder.jzvdStd.setUp(jzDataSource,Jzvd.SCREEN_NORMAL);
- Glide.with(holder.jzvdStd.getContext()).load(VideoConstant.videoThumbs[0][position]).into(holder.jzvdStd.thumbImageView);
+ Glide.with(holder.jzvdStd.getContext()).load(VideoConstant.videoPosters[0][position]).into(holder.jzvdStd.posterImageView);
}
@Override
diff --git a/app/src/main/res/drawable-xxhdpi/ic_add_star.png b/app/src/main/res/drawable-xxhdpi/ic_add_star.png
new file mode 100644
index 00000000..bb3f53ae
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_add_star.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_comment_normal.png b/app/src/main/res/drawable-xxhdpi/ic_comment_normal.png
new file mode 100644
index 00000000..4901df0f
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_comment_normal.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_douyin_icon.png b/app/src/main/res/drawable-xxhdpi/ic_douyin_icon.png
new file mode 100644
index 00000000..53842e22
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_douyin_icon.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_music_play.png b/app/src/main/res/drawable-xxhdpi/ic_music_play.png
new file mode 100644
index 00000000..b9105b6e
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_music_play.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_play_tiktok.png b/app/src/main/res/drawable-xxhdpi/ic_play_tiktok.png
new file mode 100644
index 00000000..707aea89
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_play_tiktok.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_star_normal.png b/app/src/main/res/drawable-xxhdpi/ic_star_normal.png
new file mode 100644
index 00000000..d6c1185b
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_star_normal.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_star_selected.png b/app/src/main/res/drawable-xxhdpi/ic_star_selected.png
new file mode 100644
index 00000000..19c8823b
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_star_selected.png differ
diff --git a/app/src/main/res/drawable/ic_border_white.xml b/app/src/main/res/drawable/ic_border_white.xml
new file mode 100644
index 00000000..df48158f
--- /dev/null
+++ b/app/src/main/res/drawable/ic_border_white.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_circle_red.xml b/app/src/main/res/drawable/ic_circle_red.xml
new file mode 100644
index 00000000..4b827735
--- /dev/null
+++ b/app/src/main/res/drawable/ic_circle_red.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_star_selector.xml b/app/src/main/res/drawable/ic_star_selector.xml
new file mode 100644
index 00000000..7e1a685d
--- /dev/null
+++ b/app/src/main/res/drawable/ic_star_selector.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_tiktok.xml b/app/src/main/res/layout/activity_tiktok.xml
index 0bdb1cbd..00ebd934 100644
--- a/app/src/main/res/layout/activity_tiktok.xml
+++ b/app/src/main/res/layout/activity_tiktok.xml
@@ -1,7 +1,8 @@
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_ui_small_change.xml b/app/src/main/res/layout/activity_ui_small_change.xml
index 47930793..163af570 100644
--- a/app/src/main/res/layout/activity_ui_small_change.xml
+++ b/app/src/main/res/layout/activity_ui_small_change.xml
@@ -12,7 +12,21 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
+
+
+
+
+
-
@@ -9,4 +9,133 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/jz_layout_standard_mp3.xml b/app/src/main/res/layout/jz_layout_standard_mp3.xml
index 9288a1ea..a934b952 100644
--- a/app/src/main/res/layout/jz_layout_standard_mp3.xml
+++ b/app/src/main/res/layout/jz_layout_standard_mp3.xml
@@ -14,7 +14,7 @@
+ android:thumb="@drawable/jz_bottom_seek_poster" />
+ android:thumb="@drawable/jz_bottom_seek_poster" />
+ android:thumb="@drawable/jz_bottom_seek_poster" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-xhdpi/add_bg.png b/app/src/main/res/mipmap-xhdpi/add_bg.png
new file mode 100644
index 00000000..a5308d6c
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/add_bg.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/btn_share_to.png b/app/src/main/res/mipmap-xhdpi/btn_share_to.png
new file mode 100644
index 00000000..7a35d10e
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/btn_share_to.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/lock.png b/app/src/main/res/mipmap-xxhdpi/lock.png
new file mode 100644
index 00000000..ff2bf0ee
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/lock.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/unlock.png b/app/src/main/res/mipmap-xxhdpi/unlock.png
new file mode 100644
index 00000000..f6893313
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/unlock.png differ
diff --git a/gradle/build_upload.gradle b/gradle/build_upload.gradle
new file mode 100644
index 00000000..d14dd515
--- /dev/null
+++ b/gradle/build_upload.gradle
@@ -0,0 +1,50 @@
+apply plugin: 'maven'
+apply plugin: 'signing'
+
+signing {
+ required { false }
+ sign configurations.archives
+}
+
+group = "cn.jzvd"
+archivesBaseName = "jiaozivideoplayer"
+version = "7.2.2"
+
+uploadArchives {
+ repositories {
+ mavenDeployer {
+ beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
+
+ repository(url: uri('build/buildUpload'))
+
+ pom.project {
+ name 'jiaozivideoplayer'
+ packaging 'aar'
+ }
+ }
+ }
+}
+
+task androidJavadocs(type: Javadoc) {
+ source = android.sourceSets.main.java.srcDirs
+ options {
+ encoding = "UTF-8"
+ }
+ classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
+}
+
+task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
+ classifier = 'javadoc'
+ from androidJavadocs.destinationDir
+}
+
+task androidSourcesJar(type: Jar) {
+ classifier = 'sources'
+ from android.sourceSets.main.java.srcDirs
+}
+
+artifacts {
+ archives androidSourcesJar
+ archives androidJavadocsJar
+}
+
diff --git a/gradle/maven_push.gradle b/gradle/maven_push.gradle
deleted file mode 100644
index 698febe5..00000000
--- a/gradle/maven_push.gradle
+++ /dev/null
@@ -1,77 +0,0 @@
-apply plugin: 'maven'
-apply plugin: 'signing'
-
-signing {
- required { false }
- sign configurations.archives
-}
-
-group = "cn.jzvd"
-archivesBaseName = "jiaozivideoplayer"
-version = "7.2.1"
-
-uploadArchives {
- repositories {
- mavenDeployer {
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
-
-// repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
-// authentication(userName: getProperty('ossrhUsername'),
-// password: getProperty('ossrhPassword'))
-// }
-
- pom.project {
- name 'jiaozivideoplayer'
- packaging 'aar'
- // optionally artifactId can be defined here
- description 'android videoplayer videoview 安卓视频播放器 全屏 播放器列表全屏 仿今日头条UI'
- url 'https://github.com/Jzvd/JiaoZiVideoPlayer'
-
- scm {
- connection 'https://github.com/Jzvd/JiaoZiVideoPlayer'
- developerConnection 'https://github.com/Jzvd/JiaoZiVideoPlayer'
- url 'https://github.com/Jzvd/JiaoZiVideoPlayer'
- }
-
- licenses {
- license {
- name 'MIT'
- url 'http://mit-license.org/'
- }
- }
-
- developers {
- developer {
- id 'Nathen'
- name 'Nathen'
- email '1066666651@qq.com'
- }
- }
- }
- }
- }
-}
-
-task androidJavadocs(type: Javadoc) {
- source = android.sourceSets.main.java.srcDirs
- options {
- encoding = "UTF-8"
- }
- classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
-}
-
-task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
- classifier = 'javadoc'
- from androidJavadocs.destinationDir
-}
-
-task androidSourcesJar(type: Jar) {
- classifier = 'sources'
- from android.sourceSets.main.java.srcDirs
-}
-
-artifacts {
- archives androidSourcesJar
- archives androidJavadocsJar
-}
-
diff --git a/jiaozivideoplayer/build.gradle b/jiaozivideoplayer/build.gradle
index 32037b5c..f4b4f780 100644
--- a/jiaozivideoplayer/build.gradle
+++ b/jiaozivideoplayer/build.gradle
@@ -6,14 +6,15 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
- versionCode 96
- versionName "7.2.1"
+ versionCode 97
+ versionName "7.2.2"
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
+
lintOptions {
abortOnError false
}
@@ -25,4 +26,4 @@ dependencies {
compileOnly 'androidx.appcompat:appcompat:1.1.0'
}
-apply from: '../gradle/maven_push.gradle'
+apply from: '../gradle/build_upload.gradle'
diff --git a/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java b/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java
index 2152dbb1..7acf5dc1 100644
--- a/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java
+++ b/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java
@@ -510,6 +510,7 @@ public void reset() {
/**
* 里面的的onState...()其实就是setState...(),因为要可以被复写,所以参考Activity的onCreate(),onState..()的方式看着舒服一些,老铁们有何高见。
+ *
* @param state
*/
public void setState(int state) {
@@ -934,7 +935,9 @@ public void onAudioFocusChange(int focusChange) {
}
};
-
+ /**
+ * 增加准备状态逻辑
+ */
public static void goOnPlayOnResume() {
if (CURRENT_JZVD != null) {
if (CURRENT_JZVD.state == Jzvd.STATE_PAUSE) {
@@ -946,17 +949,27 @@ public static void goOnPlayOnResume() {
CURRENT_JZVD.mediaInterface.start();
}
ON_PLAY_PAUSE_TMP_STATE = 0;
+ } else if (CURRENT_JZVD.state == Jzvd.STATE_PREPARING) {
+ //准备状态暂停后的
+ CURRENT_JZVD.startVideo();
+// CURRENT_JZVD.mediaInterface.start();
}
}
}
+ /**
+ * 增加准备状态逻辑
+ */
public static void goOnPlayOnPause() {
if (CURRENT_JZVD != null) {
if (CURRENT_JZVD.state == Jzvd.STATE_AUTO_COMPLETE ||
CURRENT_JZVD.state == Jzvd.STATE_NORMAL ||
- CURRENT_JZVD.state == Jzvd.STATE_PREPARING ||
CURRENT_JZVD.state == Jzvd.STATE_ERROR) {
Jzvd.releaseAllVideos();
+ } else if (CURRENT_JZVD.state == Jzvd.STATE_PREPARING) {
+ //准备状态暂停的逻辑
+ Jzvd.setCurrentJzvd(CURRENT_JZVD);
+ CURRENT_JZVD.state = STATE_PREPARING;
} else {
ON_PLAY_PAUSE_TMP_STATE = CURRENT_JZVD.state;
CURRENT_JZVD.onStatePause();
diff --git a/jiaozivideoplayer/src/main/java/cn/jzvd/JzvdStd.java b/jiaozivideoplayer/src/main/java/cn/jzvd/JzvdStd.java
index 4bc8900a..a05e8cf2 100644
--- a/jiaozivideoplayer/src/main/java/cn/jzvd/JzvdStd.java
+++ b/jiaozivideoplayer/src/main/java/cn/jzvd/JzvdStd.java
@@ -45,7 +45,7 @@ public class JzvdStd extends Jzvd {
public ImageView backButton;
public ProgressBar bottomProgressBar, loadingProgressBar;
public TextView titleTextView;
- public ImageView thumbImageView;
+ public ImageView posterImageView;
public ImageView tinyBackImageView;
public LinearLayout batteryTimeLayout;
public ImageView batteryLevel;
@@ -85,7 +85,7 @@ public void init(Context context) {
bottomProgressBar = findViewById(R.id.bottom_progress);
titleTextView = findViewById(R.id.title);
backButton = findViewById(R.id.back);
- thumbImageView = findViewById(R.id.thumb);
+ posterImageView = findViewById(R.id.poster);
loadingProgressBar = findViewById(R.id.loading);
tinyBackImageView = findViewById(R.id.back_tiny);
batteryLevel = findViewById(R.id.battery_level);
@@ -95,7 +95,7 @@ public void init(Context context) {
mRetryBtn = findViewById(R.id.retry_btn);
mRetryLayout = findViewById(R.id.retry_layout);
- thumbImageView.setOnClickListener(this);
+ posterImageView.setOnClickListener(this);
backButton.setOnClickListener(this);
tinyBackImageView.setOnClickListener(this);
clarity.setOnClickListener(this);
@@ -250,7 +250,7 @@ public boolean onTouch(View v, MotionEvent event) {
public void onClick(View v) {
super.onClick(v);
int i = v.getId();
- if (i == R.id.thumb) {
+ if (i == R.id.poster) {
if (jzDataSource == null || jzDataSource.urlsMap.isEmpty() || jzDataSource.getCurrentUrl() == null) {
Toast.makeText(getContext(), getResources().getString(R.string.no_url), Toast.LENGTH_SHORT).show();
return;
@@ -655,12 +655,12 @@ public void changeUiToError() {
}
public void setAllControlsVisiblity(int topCon, int bottomCon, int startBtn, int loadingPro,
- int thumbImg, int bottomPro, int retryLayout) {
+ int posterImg, int bottomPro, int retryLayout) {
topContainer.setVisibility(topCon);
bottomContainer.setVisibility(bottomCon);
startButton.setVisibility(startBtn);
loadingProgressBar.setVisibility(loadingPro);
- thumbImageView.setVisibility(thumbImg);
+ posterImageView.setVisibility(posterImg);
bottomProgressBar.setVisibility(bottomPro);
mRetryLayout.setVisibility(retryLayout);
}
diff --git a/jiaozivideoplayer/src/main/res/drawable/jz_bottom_seek_poster.xml b/jiaozivideoplayer/src/main/res/drawable/jz_bottom_seek_poster.xml
new file mode 100644
index 00000000..0cd8f9b3
--- /dev/null
+++ b/jiaozivideoplayer/src/main/res/drawable/jz_bottom_seek_poster.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/jiaozivideoplayer/src/main/res/drawable/jz_bottom_seek_thumb.xml b/jiaozivideoplayer/src/main/res/drawable/jz_bottom_seek_thumb.xml
deleted file mode 100644
index b68ee1ef..00000000
--- a/jiaozivideoplayer/src/main/res/drawable/jz_bottom_seek_thumb.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/jiaozivideoplayer/src/main/res/drawable/jz_seek_thumb_normal.xml b/jiaozivideoplayer/src/main/res/drawable/jz_seek_poster_normal.xml
similarity index 100%
rename from jiaozivideoplayer/src/main/res/drawable/jz_seek_thumb_normal.xml
rename to jiaozivideoplayer/src/main/res/drawable/jz_seek_poster_normal.xml
diff --git a/jiaozivideoplayer/src/main/res/drawable/jz_seek_thumb_pressed.xml b/jiaozivideoplayer/src/main/res/drawable/jz_seek_poster_pressed.xml
similarity index 100%
rename from jiaozivideoplayer/src/main/res/drawable/jz_seek_thumb_pressed.xml
rename to jiaozivideoplayer/src/main/res/drawable/jz_seek_poster_pressed.xml
diff --git a/jiaozivideoplayer/src/main/res/layout/jz_layout_std.xml b/jiaozivideoplayer/src/main/res/layout/jz_layout_std.xml
index a6b12d55..ffd31558 100644
--- a/jiaozivideoplayer/src/main/res/layout/jz_layout_std.xml
+++ b/jiaozivideoplayer/src/main/res/layout/jz_layout_std.xml
@@ -13,7 +13,7 @@
+ android:thumb="@drawable/jz_bottom_seek_poster" />