From c16afd490d9e2c30b0f84ca7300fdb4999046739 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Wed, 23 Sep 2020 21:59:56 +0800
Subject: [PATCH 01/52] dependencies
---
build.gradle | 2 +-
demo/build.gradle | 2 +-
gradlew | 0
library/build.gradle | 2 +-
4 files changed, 3 insertions(+), 3 deletions(-)
mode change 100644 => 100755 gradlew
diff --git a/build.gradle b/build.gradle
index 353dce49..37589407 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = '1.3.72'
+ ext.kotlin_version = '1.4.10'
repositories {
jcenter()
google()
diff --git a/demo/build.gradle b/demo/build.gradle
index 240a542d..a352a4da 100644
--- a/demo/build.gradle
+++ b/demo/build.gradle
@@ -49,7 +49,7 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'com.google.android.material:material:1.2.0'
+ implementation 'com.google.android.material:material:1.2.1'
implementation project(':library')
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
diff --git a/gradlew b/gradlew
old mode 100644
new mode 100755
diff --git a/library/build.gradle b/library/build.gradle
index d809fca6..e5bcd2df 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -24,7 +24,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "androidx.core:core-ktx:+"
+ implementation "androidx.core:core-ktx:1.3.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
From b882f22bc2765ce7b49eb714d9f72b0ac3a96f06 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Wed, 23 Sep 2020 22:13:23 +0800
Subject: [PATCH 02/52] upgrade kt
---
library/build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/library/build.gradle b/library/build.gradle
index e5bcd2df..5e66face 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -25,7 +25,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.core:core-ktx:1.3.1"
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
apply from: '../gradle/build_upload.gradle'
From 378170db9ce0299b55d4022a4712741110dafc74 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Sat, 26 Sep 2020 01:32:47 +0800
Subject: [PATCH 03/52] readme
---
README.md | 50 ++++++++++----------------------------------------
1 file changed, 10 insertions(+), 40 deletions(-)
diff --git a/README.md b/README.md
index 1ecb6816..ecaf10dc 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,8 @@
-
+
--
-
-
-
-
-
-
-
-高度自定义的安卓视频框架
-
-## 置顶消息:
-
-群主微信进饺子粉丝群,沟通重心从Q群转移到微信群。微信:lipangit备注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),必定大有可为。
-
-#### [找点事做挣饺子币](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%89%BE%E7%82%B9%E4%BA%8B%E5%81%9A%EF%BC%8C%E6%8C%A3%E7%82%B9%E9%A5%BA%E5%AD%90%E5%B8%81)
-
-#### [购买咨询服务送饺子币](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E8%B4%AD%E4%B9%B0%E5%92%A8%E8%AF%A2%E6%9C%8D%E5%8A%A1%E9%80%81%E9%A5%BA%E5%AD%90%E5%B8%81)
-
-## 文档
-
-- [文档 - API](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-API),下载安装[Demo jiaozivideoplayer-7.5.0.apk](https://github.com/Jzvd/JiaoZiVideoPlayer/releases/download/v7.5.0/jiaozivideoplayer-7.5.0.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),测试哪个播放内核适合自己的项目
-
-## 效果
-
-
-
-
+高度自定义的安卓视频框架
## QuickStart
@@ -92,18 +63,17 @@ protected void onPause() {
-keep interface tv.danmaku.ijk.media.player.** { *; }
```
-即便是自定义UI,或者对Library有过修改,依然要通过上述步骤使用播放器。
-
-## 注意:
-1. 7.0版本之后要在JzvdStd外面包一层Layout
-2. 如果引入配置失败,根据失败的log检查是否添加了Java8的配置,或者升级环境到最新的稳定版
-
-## JZVD DEMO说明
-
+## 效果
+
+
+
+
+
+
## License MIT
-Copyright (c) 2015-2020 李盼
+Copyright (c) 2015-2020 jzvd.org
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
From a9d3855e347554fb52980d40bcd946a6352db363 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Sat, 26 Sep 2020 01:47:31 +0800
Subject: [PATCH 04/52] readme
---
README.md | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index ecaf10dc..50c00ca2 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,3 @@
-
---
-
-
高度自定义的安卓视频框架
## QuickStart
@@ -65,10 +61,10 @@ protected void onPause() {
## 效果
-
+
-
+
## License MIT
From aa66c160f72b0ed72c6cab085543cdd9a265b055 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Sun, 27 Sep 2020 03:07:32 +0800
Subject: [PATCH 05/52] index.md
---
docs/index.md | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 docs/index.md
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 00000000..e69de29b
From b5b6b652b12f0f6af15c1ed5dbfded23ec555a8c Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Mon, 28 Sep 2020 20:39:36 +0800
Subject: [PATCH 06/52] docs
---
demo/src/main/AndroidManifest.xml | 4 -
.../java/cn/jzvd/demo/Fragment_1_Base.java | 9 +-
.../Tab_1_Basic/ExtendsNormalActivity.java | 44 ----------
.../res/layout/activity_extends_normal.xml | 16 ----
demo/src/main/res/layout/fragment_api.xml | 8 --
docs/index.md | 85 +++++++++++++++++++
6 files changed, 86 insertions(+), 80 deletions(-)
delete mode 100644 demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/ExtendsNormalActivity.java
delete mode 100644 demo/src/main/res/layout/activity_extends_normal.xml
diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml
index d5804e44..2d567c9e 100644
--- a/demo/src/main/AndroidManifest.xml
+++ b/demo/src/main/AndroidManifest.xml
@@ -72,10 +72,6 @@
android:name=".Tab_1_Basic.OrientationActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
-
-
-
-
-
-
diff --git a/demo/src/main/res/layout/fragment_api.xml b/demo/src/main/res/layout/fragment_api.xml
index 62dc8c73..4dd0961e 100644
--- a/demo/src/main/res/layout/fragment_api.xml
+++ b/demo/src/main/res/layout/fragment_api.xml
@@ -29,14 +29,6 @@
android:layout_marginBottom="8dp"
android:text="@string/orientation" />
-
-
= 45 && orientation <= 315 && mJzvdStd.screen == Jzvd.SCREEN_NORMAL) {
+ changeScreenFullLandscape(ScreenRotateUtils.orientationDirection);
+ } else if (((orientation >= 0 && orientation < 45) || orientation > 315) && mJzvdStd.screen == Jzvd.SCREEN_FULLSCREEN) {
+ changeScrenNormal();
+ }
+}
+```
+
+# 继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2 (内容较多,应放到二级页面)
+
+1.继承JzvdStd后删除不需要的父类控件
+
+2.全屏锁
+
+3.全屏时显示分享按钮
+
+4.全屏时显示title,非全屏隐藏title
+
+5.播放完毕后不隐藏TextureView显示视频的最后一帧
+
+6.播放完成不退出全屏状态
+
+7.设置视频高宽比例
+
+8.非全屏静音,全屏之后有声音
+
+9.全屏显示静音按钮
+
+10.播放mp3
+
+11.倍速播放
+
+# 列表的使用,推荐RecycleView,不推荐ListView
+
+
+
+
From 8339e2c8eefe8b9b4535bba9d90d5a37b5cd3eaa Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Mon, 28 Sep 2020 23:34:06 +0800
Subject: [PATCH 07/52] docs
---
.../demo/Tab_1_Basic/CustomMediaActivity.java | 5 +--
docs/index.md | 32 +++++++++++++------
docs/quickstart.md | 0
3 files changed, 25 insertions(+), 12 deletions(-)
create mode 100644 docs/quickstart.md
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java
index 4fe9ddc4..77b148a7 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java
@@ -73,8 +73,9 @@ public void clickChangeToExo(View view) {
public void clickChangeToAliyun(View view) {
Jzvd.releaseAllVideos();
- jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
- , "饺子梭哈", JzvdStd.SCREEN_NORMAL, JZMediaAliyun.class);
+// jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
+// , "饺子梭哈", JzvdStd.SCREEN_NORMAL, JZMediaAliyun.class);
+ jzvdStd.setMediaInterface(JZMediaAliyun.class);
jzvdStd.startVideo();
Toast.makeText(this, "Change to AliyunPlayer", Toast.LENGTH_SHORT).show();
}
diff --git a/docs/index.md b/docs/index.md
index be3b0e82..4cd8f924 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,12 +1,12 @@
-# 中文文档
+## 中文文档
-首先下载Demo,Demo是文档的重要组成部分,看完Demo的每个页面,尝试Demo的每个按钮之后,再集成JZVideo的代码。
+本文档围绕Demo进行讲解。集成JZVideo之前,看完Demo的每个页面,点击Demo的每个按钮之后,找到自己需要的功能之后,再开始写代码。
-# QuickStart
+## QuickStart
见GitHub首页
-# 初级用法(或者放到二级页面,也没必要有代码,放链接就好了)
+## 初级用法(或者放到二级页面,也没必要有代码,放链接就好了)
不需要继承JzvdStd,直接调用JzvdStd暴露的接口和变量。效果见Demo的Tab_1
@@ -26,12 +26,13 @@ Jzvd.setTextureViewRotation(90); //0 - 360 旋转的角度
```
3.[自定义播放内核](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java),选择适合项目的播放内核。
+
```
+jzvdStd.setUp("http://url.mp4", "title", JzvdStd.SCREEN_NORMAL, **.class);
+or
+jzvdStd.setMediaInterface(**.class);
-jzvdStd.setUp("http://url.mp4", "title", JzvdStd.SCREEN_NORMAL, JZMediaAliyun.class);
-jzvdStd.setUp("http://url.mp4", "title", JzvdStd.SCREEN_NORMAL, JZMediaIjk.class);
-jzvdStd.setUp("http://url.mp4", "title", JzvdStd.SCREEN_NORMAL, JZMediaSystem.class);
-jzvdStd.setUp("http://url.mp4", "title", JzvdStd.SCREEN_NORMAL, JZMediaExo.class);
+//Demo提供了四个播放内核。JZMediaAliyun,JZMediaIjk.class,JZMediaSystem.class,JZMediaExo.class
```
4.[控制全屏前和全屏后的屏幕方向,进入全屏前和全屏后的屏幕方向](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java#L41),可以设置为退出全屏时横屏,进入全屏时竖屏。
@@ -54,7 +55,7 @@ public void orientationChange(int orientation) {
}
```
-# 继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2 (内容较多,应放到二级页面)
+## 继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2 (内容较多,应放到二级页面)
1.继承JzvdStd后删除不需要的父类控件
@@ -78,8 +79,19 @@ public void orientationChange(int orientation) {
11.倍速播放
-# 列表的使用,推荐RecycleView,不推荐ListView
+## 列表的使用,推荐RecycleView,不推荐ListView
+
+## 进阶用法
+
+1.AgVideo 完全自定义UI
+
+2.详情页穿透
+
+3.Gif截图
+4.列表自动播放
+5.仿抖音UI
+6.小窗播
diff --git a/docs/quickstart.md b/docs/quickstart.md
new file mode 100644
index 00000000..e69de29b
From a9de5c0f0e8639ff3d63a7457c7842876ea0a4e2 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Mon, 28 Sep 2020 23:56:58 +0800
Subject: [PATCH 08/52] docs
---
docs/index.md | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/docs/index.md b/docs/index.md
index 4cd8f924..9c652512 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,12 +1,12 @@
-## 中文文档
+### [中文文档](https://github.com/Jzvd/JZVideo)
本文档围绕Demo进行讲解。集成JZVideo之前,看完Demo的每个页面,点击Demo的每个按钮之后,找到自己需要的功能之后,再开始写代码。
-## QuickStart
+### QuickStart
见GitHub首页
-## 初级用法(或者放到二级页面,也没必要有代码,放链接就好了)
+### 初级用法(或者放到二级页面,也没必要有代码,放链接就好了)
不需要继承JzvdStd,直接调用JzvdStd暴露的接口和变量。效果见Demo的Tab_1
@@ -28,11 +28,12 @@ Jzvd.setTextureViewRotation(90); //0 - 360 旋转的角度
3.[自定义播放内核](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java),选择适合项目的播放内核。
```
+//Demo提供了四个播放内核。JZMediaAliyun,JZMediaIjk.class,JZMediaSystem.class,JZMediaExo.class,通过如下两种方式使用。
jzvdStd.setUp("http://url.mp4", "title", JzvdStd.SCREEN_NORMAL, **.class);
or
jzvdStd.setMediaInterface(**.class);
-//Demo提供了四个播放内核。JZMediaAliyun,JZMediaIjk.class,JZMediaSystem.class,JZMediaExo.class
+
```
4.[控制全屏前和全屏后的屏幕方向,进入全屏前和全屏后的屏幕方向](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java#L41),可以设置为退出全屏时横屏,进入全屏时竖屏。
@@ -55,7 +56,7 @@ public void orientationChange(int orientation) {
}
```
-## 继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2 (内容较多,应放到二级页面)
+### 继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2 (内容较多的,应放到二级页面)
1.继承JzvdStd后删除不需要的父类控件
@@ -79,9 +80,9 @@ public void orientationChange(int orientation) {
11.倍速播放
-## 列表的使用,推荐RecycleView,不推荐ListView
+### 列表的使用,推荐RecycleView,不推荐ListView
-## 进阶用法
+### 进阶用法
1.AgVideo 完全自定义UI
From e8780dcd6c1bf42293332dfa01e41b364accf456 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Tue, 29 Sep 2020 00:15:00 +0800
Subject: [PATCH 09/52] docs
---
demo/src/main/res/layout/fragment_custom.xml | 4 +--
docs/index.md | 36 +++++++++++---------
2 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/demo/src/main/res/layout/fragment_custom.xml b/demo/src/main/res/layout/fragment_custom.xml
index a4c3d497..9052d581 100644
--- a/demo/src/main/res/layout/fragment_custom.xml
+++ b/demo/src/main/res/layout/fragment_custom.xml
@@ -108,7 +108,7 @@
android:text="@string/play_with_1_1" />
-
@@ -122,7 +122,7 @@
android:text="@string/play_with_16_9" />
-
diff --git a/docs/index.md b/docs/index.md
index 9c652512..b0b4d0ae 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -4,9 +4,9 @@
### QuickStart
-见GitHub首页
+[见GitHub首页](https://github.com/Jzvd/JZVideo)
-### 初级用法(或者放到二级页面,也没必要有代码,放链接就好了)
+### 初级用法
不需要继承JzvdStd,直接调用JzvdStd暴露的接口和变量。效果见Demo的Tab_1
@@ -25,7 +25,7 @@ Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_ORIGINAL);
Jzvd.setTextureViewRotation(90); //0 - 360 旋转的角度
```
-3.[自定义播放内核](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java),选择适合项目的播放内核。
+3.[切换播放内核](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java),选择适合项目的播放内核。
```
//Demo提供了四个播放内核。JZMediaAliyun,JZMediaIjk.class,JZMediaSystem.class,JZMediaExo.class,通过如下两种方式使用。
@@ -36,11 +36,11 @@ jzvdStd.setMediaInterface(**.class);
```
-4.[控制全屏前和全屏后的屏幕方向,进入全屏前和全屏后的屏幕方向](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java#L41),可以设置为退出全屏时横屏,进入全屏时竖屏。
+4.[分别设置非全屏和全屏后的屏幕方向](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java#L41)
```
-Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
-Jzvd.NORMAL_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
+Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;// 非全屏是横屏
+Jzvd.NORMAL_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;// 进入全屏后是竖屏
```
5.[根据传感器自动旋转屏幕进入全屏](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/ScreenRotateActivity.java)
@@ -58,30 +58,32 @@ public void orientationChange(int orientation) {
### 继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2 (内容较多的,应放到二级页面)
-1.继承JzvdStd后删除不需要的父类控件
+1.继承JzvdStd后删除不需要的父类控件 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStdNoTitleNoClarity.java)
-2.全屏锁
+2.全屏锁 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdLockScreen.java)
-3.全屏时显示分享按钮
+3.全屏时显示分享按钮 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowShareButtonAfterFullscreen.java)
-4.全屏时显示title,非全屏隐藏title
+4.全屏时显示title,非全屏隐藏title [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTitleAfterFullscreen.java)
-5.播放完毕后不隐藏TextureView显示视频的最后一帧
+5.播放完毕后不隐藏TextureView显示视频的最后一帧 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTextureViewAfterAutoComplete.java)
-6.播放完成不退出全屏状态
+6.播放完成不退出全屏状态 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoCompleteAfterFullscreen.java)
-7.设置视频高宽比例
+7.设置视频高宽比例 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java#L111)
-8.非全屏静音,全屏之后有声音
+8.非全屏静音,全屏之后有声音 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdVolumeAfterFullscreen.java)
-9.全屏显示静音按钮
+9.全屏显示静音按钮 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdVolume.java)
-10.播放mp3
+10.播放mp3 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdMp3.java)
-11.倍速播放
+11.倍速播放 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdSpeed.java)
### 列表的使用,推荐RecycleView,不推荐ListView
+
+
### 进阶用法
1.AgVideo 完全自定义UI
From 8f4a559d4f8b99bd9949c56cd73383f5e027a081 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Tue, 29 Sep 2020 01:22:10 +0800
Subject: [PATCH 10/52] docs
---
.../jzvd/demo/Tab_1_Basic/OrientationActivity.java | 2 +-
demo/src/main/res/layout/fragment_api.xml | 14 ++++++--------
demo/src/main/res/values-zh/strings.xml | 4 ++--
docs/index.md | 10 ++++++----
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java
index c74928ce..adf60ff0 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java
@@ -41,7 +41,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
protected void onResume() {
super.onResume();
Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
- Jzvd.NORMAL_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
+ Jzvd.NORMAL_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
}
@Override
diff --git a/demo/src/main/res/layout/fragment_api.xml b/demo/src/main/res/layout/fragment_api.xml
index 4dd0961e..829d1d36 100644
--- a/demo/src/main/res/layout/fragment_api.xml
+++ b/demo/src/main/res/layout/fragment_api.xml
@@ -14,20 +14,18 @@
android:layout_height="wrap_content"
android:orientation="vertical">
-
-
+ android:text="@string/custom_mediaplayer" />
+ android:text="@string/preloading" />
+ android:text="@string/orientation" />
列表
更多
大改饺子播放器(自定义)
- 视频播放方向控制
+ 分别设置全屏前和全屏后的屏幕方向
继承Activity非AppCompatActivity
调整视频填充方式、播放方向
自定义播放内核
视频预加载
- 视频根据传感器自动旋转
+ 视频根据传感器自动进入和退出全屏
Gif截图
继承JzvdStd删除父布局的一些控件
继承JzvdStd删除父布局的一些控件并添加锁定按钮
diff --git a/docs/index.md b/docs/index.md
index b0b4d0ae..3af08068 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,6 +1,6 @@
-### [中文文档](https://github.com/Jzvd/JZVideo)
+### [饺子视频播放器文档](https://github.com/Jzvd/JZVideo)
-本文档围绕Demo进行讲解。集成JZVideo之前,看完Demo的每个页面,点击Demo的每个按钮之后,找到自己需要的功能之后,再开始写代码。
+本文档围绕Demo([点此下载](https://github.com/Jzvd/JZVideo/releases))进行讲解。集成JZVideo之前,看完Demo的每个页面,点击Demo的每个按钮之后,找到自己需要的功能之后,再开始写代码。
### QuickStart
@@ -56,7 +56,9 @@ public void orientationChange(int orientation) {
}
```
-### 继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2 (内容较多的,应放到二级页面)
+### 继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2
+
+- AgVideo 完全自定义UI [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java)
1.继承JzvdStd后删除不需要的父类控件 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStdNoTitleNoClarity.java)
@@ -68,7 +70,7 @@ public void orientationChange(int orientation) {
5.播放完毕后不隐藏TextureView显示视频的最后一帧 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTextureViewAfterAutoComplete.java)
-6.播放完成不退出全屏状态 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoCompleteAfterFullscreen.java)
+6.全屏播放完成不退出全屏 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoCompleteAfterFullscreen.java)
7.设置视频高宽比例 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java#L111)
From 63c02608d214b0aa73081cfd1e1211d468f09533 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Tue, 29 Sep 2020 01:28:02 +0800
Subject: [PATCH 11/52] docs
---
docs/index.md | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/docs/index.md b/docs/index.md
index 3af08068..9d4a7d04 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,6 +1,6 @@
### [饺子视频播放器文档](https://github.com/Jzvd/JZVideo)
-本文档围绕Demo([点此下载](https://github.com/Jzvd/JZVideo/releases))进行讲解。集成JZVideo之前,看完Demo的每个页面,点击Demo的每个按钮之后,找到自己需要的功能之后,再开始写代码。
+本文档围绕Demo([点此下载](https://github.com/Jzvd/JZVideo/releases))进行讲解。集成JZVideo之前,看完Demo的每个页面,点击Demo的每个按钮之后,再开始写代码。
### QuickStart
@@ -10,7 +10,7 @@
不需要继承JzvdStd,直接调用JzvdStd暴露的接口和变量。效果见Demo的Tab_1
-1.[设置视频的填充模式](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/RotationVideoSizeActivity.java)
+1.设置视频的填充模式 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/RotationVideoSizeActivity.java)
```
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_ADAPTER);
@@ -19,31 +19,29 @@ Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_SCROP);
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_ORIGINAL);
```
-2.[设置视频的方向](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/RotationVideoSizeActivity.java)
+2.设置视频的方向 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/RotationVideoSizeActivity.java)
```
Jzvd.setTextureViewRotation(90); //0 - 360 旋转的角度
```
-3.[切换播放内核](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java),选择适合项目的播放内核。
+3.切换播放内核 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java),选择适合项目的播放内核。
```
//Demo提供了四个播放内核。JZMediaAliyun,JZMediaIjk.class,JZMediaSystem.class,JZMediaExo.class,通过如下两种方式使用。
jzvdStd.setUp("http://url.mp4", "title", JzvdStd.SCREEN_NORMAL, **.class);
or
jzvdStd.setMediaInterface(**.class);
-
-
```
-4.[分别设置非全屏和全屏后的屏幕方向](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java#L41)
+4.分别设置非全屏和全屏后的屏幕方向 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java#L41)
```
Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;// 非全屏是横屏
Jzvd.NORMAL_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;// 进入全屏后是竖屏
```
-5.[根据传感器自动旋转屏幕进入全屏](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/ScreenRotateActivity.java)
+5.根据传感器自动旋转屏幕进入全屏 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/ScreenRotateActivity.java)
```
@Override
From 1c9547a9dcb9b7a1611d5d271367d157557c898f Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Tue, 29 Sep 2020 01:31:14 +0800
Subject: [PATCH 12/52] readme
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 50c00ca2..66430256 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
高度自定义的安卓视频框架
+[文档](https://jzvd.github.io/JZVideo/) [下载Demo](https://github.com/Jzvd/JZVideo/releases/download/v7.5.0/jiaozivideoplayer-7.5.0.apk)
+
## QuickStart
1.添加类库
From bfdc979b1679a7c8944c311f77fac76009185ba0 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Tue, 29 Sep 2020 02:00:23 +0800
Subject: [PATCH 13/52] docs
---
README.md | 4 +++-
docs/index.md | 7 +++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 66430256..316da79b 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
高度自定义的安卓视频框架
-[文档](https://jzvd.github.io/JZVideo/) [下载Demo](https://github.com/Jzvd/JZVideo/releases/download/v7.5.0/jiaozivideoplayer-7.5.0.apk)
+[中文文档](https://jzvd.github.io/JZVideo/)
+
+[下载Demo](https://github.com/Jzvd/JZVideo/releases/download/v7.5.0/jiaozivideoplayer-7.5.0.apk)
## QuickStart
diff --git a/docs/index.md b/docs/index.md
index 9d4a7d04..a6646aa8 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -54,6 +54,13 @@ public void orientationChange(int orientation) {
}
```
+6.预加载 [进入源码]()
+
+```
+jzvdStd.startPreloading(); //开始预加载,加载完等待播放
+jzvdStd.startVideoAfterPreloading(); //如果预加载完会开始播放,如果未加载则开始加载
+```
+
### 继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2
- AgVideo 完全自定义UI [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java)
From 448adfaa3f29c46b69fd94dc58dcd269e1e2a52f Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Wed, 30 Sep 2020 03:18:30 +0800
Subject: [PATCH 14/52] docs
---
docs/index.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/index.md b/docs/index.md
index a6646aa8..9255e410 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,12 +1,12 @@
-### [饺子视频播放器文档](https://github.com/Jzvd/JZVideo)
+## [饺子视频播放器文档](https://github.com/Jzvd/JZVideo)
本文档围绕Demo([点此下载](https://github.com/Jzvd/JZVideo/releases))进行讲解。集成JZVideo之前,看完Demo的每个页面,点击Demo的每个按钮之后,再开始写代码。
-### QuickStart
+## 一、QuickStart
[见GitHub首页](https://github.com/Jzvd/JZVideo)
-### 初级用法
+## 二、初级用法
不需要继承JzvdStd,直接调用JzvdStd暴露的接口和变量。效果见Demo的Tab_1
@@ -61,7 +61,7 @@ jzvdStd.startPreloading(); //开始预加载,加载完等待播放
jzvdStd.startVideoAfterPreloading(); //如果预加载完会开始播放,如果未加载则开始加载
```
-### 继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2
+## 三、继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2
- AgVideo 完全自定义UI [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java)
@@ -87,11 +87,11 @@ jzvdStd.startVideoAfterPreloading(); //如果预加载完会开始播放,如
11.倍速播放 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdSpeed.java)
-### 列表的使用,推荐RecycleView,不推荐ListView
+## 四、列表的使用
+推荐RecycleView,不推荐ListView
-
-### 进阶用法
+## 五、进阶用法
1.AgVideo 完全自定义UI
From d1add9f54c41a6336b0e8a8f32c1736e33bc16ea Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Wed, 30 Sep 2020 03:22:33 +0800
Subject: [PATCH 15/52] docs
---
docs/index.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/docs/index.md b/docs/index.md
index 9255e410..18467107 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,6 +1,4 @@
-## [饺子视频播放器文档](https://github.com/Jzvd/JZVideo)
-
-本文档围绕Demo([点此下载](https://github.com/Jzvd/JZVideo/releases))进行讲解。集成JZVideo之前,看完Demo的每个页面,点击Demo的每个按钮之后,再开始写代码。
+[饺子视频播放器文档](https://github.com/Jzvd/JZVideo)围绕Demo([点此下载](https://github.com/Jzvd/JZVideo/releases))进行讲解。集成JZVideo之前,看完Demo的每个页面,点击Demo的每个按钮之后,再开始写代码。
## 一、QuickStart
From cae050d7a0a72c59374962778e46c2da733a8ad2 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Wed, 30 Sep 2020 03:24:13 +0800
Subject: [PATCH 16/52] docs
---
docs/index.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/docs/index.md b/docs/index.md
index 18467107..f323af90 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -59,7 +59,9 @@ jzvdStd.startPreloading(); //开始预加载,加载完等待播放
jzvdStd.startVideoAfterPreloading(); //如果预加载完会开始播放,如果未加载则开始加载
```
-## 三、继承JzvdStd,实现更多自定义功能,效果见Demo的Tab_2
+## 三、继承JzvdStd
+
+灵活实现更多自定义功能和UI,效果见Demo的Tab_2
- AgVideo 完全自定义UI [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java)
From 79e18293b96180e4d936942b1236203eab2626d9 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Wed, 14 Oct 2020 08:13:51 +0800
Subject: [PATCH 17/52] upgrade as
---
build.gradle | 2 +-
gradle/wrapper/gradle-wrapper.properties | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/build.gradle b/build.gradle
index 37589407..e2f91af2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,7 +8,7 @@ buildscript {
maven { url 'https://maven.aliyun.com/repository/releases' }
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.0.1'
+ classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 4b061c11..b4354590 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Tue Sep 01 17:04:16 CST 2020
+#Wed Oct 14 08:09:22 CST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
From 5e3c007e7bc5e90de960e702be811a40cdeaf0ae Mon Sep 17 00:00:00 2001
From: kHRYSTAL <723526676@qq.com>
Date: Mon, 19 Oct 2020 12:03:40 +0800
Subject: [PATCH 18/52] =?UTF-8?q?update[JZMediaAliyun]:=20=E6=9B=B4?=
=?UTF-8?q?=E6=96=B0=E7=BC=93=E5=AD=98=E5=8A=9F=E8=83=BD=E4=B8=8E=E6=92=AD?=
=?UTF-8?q?=E6=94=BE=E7=BC=93=E5=AD=98bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../jzvd/demo/CustomMedia/JZMediaAliyun.java | 71 ++++++++++++++++++-
1 file changed, 70 insertions(+), 1 deletion(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomMedia/JZMediaAliyun.java b/demo/src/main/java/cn/jzvd/demo/CustomMedia/JZMediaAliyun.java
index ade29941..2b7ccfd6 100644
--- a/demo/src/main/java/cn/jzvd/demo/CustomMedia/JZMediaAliyun.java
+++ b/demo/src/main/java/cn/jzvd/demo/CustomMedia/JZMediaAliyun.java
@@ -1,7 +1,10 @@
package cn.jzvd.demo.CustomMedia;
+import android.content.Context;
+import android.content.SharedPreferences;
import android.graphics.SurfaceTexture;
import android.os.Handler;
+import android.text.TextUtils;
import android.util.Log;
import android.view.Surface;
@@ -11,12 +14,12 @@
import com.aliyun.player.bean.ErrorInfo;
import com.aliyun.player.bean.InfoBean;
import com.aliyun.player.bean.InfoCode;
+import com.aliyun.player.nativeclass.CacheConfig;
import com.aliyun.player.nativeclass.PlayerConfig;
import com.aliyun.player.source.UrlSource;
import cn.jzvd.JZMediaInterface;
import cn.jzvd.Jzvd;
-import cn.jzvd.demo.ApplicationDemo;
/**
* usage: 阿里云播放器内核
@@ -29,6 +32,8 @@ public class JZMediaAliyun extends JZMediaInterface implements IPlayer.OnPrepare
private static final String TAG = JZMediaAliyun.class.getSimpleName();
private static final int FROM_ALIYUN_PLAYER_INFO = 0x1688;
+ public static String AliyunVideoCachePath = "";
+ private int initialRotation = -1; // 视频首次播放时的初始角度 fix阿里云上传功能 缓存导致的方向改变问题
AliPlayer aliyunMediaPlayer;
private boolean isPlaying;
@@ -59,10 +64,15 @@ public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int hei
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
+ if (aliyunMediaPlayer != null)
+ aliyunMediaPlayer.redraw();
}
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
+ // 如果不支持全屏播放 建议增加下方代码
+// if (aliyunMediaPlayer != null)
+// aliyunMediaPlayer.setDisplay(null);
return false;
}
@@ -104,6 +114,22 @@ public void prepare() {
aliyunMediaPlayer.setConfig(config);
//endregion
+ //region 缓存功能
+ if (!TextUtils.isEmpty(AliyunVideoCachePath)) {
+ CacheConfig cacheConfig = new CacheConfig();
+ //开启缓存功能
+ cacheConfig.mEnable = true;
+ //能够缓存的单个文件最大时长。超过此长度则不缓存
+ cacheConfig.mMaxDurationS = 500;
+ //缓存目录的位置
+ cacheConfig.mDir = AliyunVideoCachePath;
+ //缓存目录的最大大小。超过此大小,将会删除最旧的缓存文件
+ cacheConfig.mMaxSizeMB = 200;
+ //设置缓存配置给到播放器
+ aliyunMediaPlayer.setCacheConfig(cacheConfig);
+ }
+ //endregion
+
// aliyunMediaPlayer.setAutoPlay(true); // 是否自动播放
// aliyunMediaPlayer.setLoop(true); // 是否循环播放
@@ -118,6 +144,14 @@ public void prepare() {
aliyunMediaPlayer.setOnLoadingStatusListener(JZMediaAliyun.this);
//endregion
+ // aliYun 播放器展示模式与Jzvd展示兼容 可通过jzDataSource传参修改
+ if (jzvd.jzDataSource.objects != null) {
+ Jzvd.setVideoImageDisplayType((Integer) jzvd.jzDataSource.objects[0]);
+ } else {
+ Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_SCROP); // 默认剪裁模式
+ }
+ aliyunMediaPlayer.setScaleMode(IPlayer.ScaleMode.SCALE_ASPECT_FIT); // 设置模式为fit适应
+
//设置配置给播放器
try {
// 创建DataSource,准备播放 可通过jzDataSource区分是否加密
@@ -213,6 +247,24 @@ public void onPrepared() {
@Override
public void onVideoSizeChanged(int i, int i1) {
+ if (aliyunMediaPlayer != null && !TextUtils.isEmpty(AliyunVideoCachePath)) {
+ // FIXME: 2020/10/19 解决问题: 在播放网络视频时 能拿到视频的旋转角度正常播放, 在播放缓存的视频时 角度为0 播放方向异常, 需要转换为初始网络视频的角度, 因此对角度进行缓存 如果视频角度发生变化, 旋转为初始网络视频记录的角度
+ if (initialRotation == -1) { // 视频开始播放时
+ if (getCacheRotation(jzvd.jzDataSource.getCurrentUrl()) == -1) { // 没进行过角度的缓存 说明是第一次播放
+ Log.d(TAG, "第一次播放, 记录角度:" + aliyunMediaPlayer.getVideoRotation());
+ initialRotation = aliyunMediaPlayer.getVideoRotation();
+ saveCacheRotation(jzvd.jzDataSource.getCurrentUrl(), aliyunMediaPlayer.getVideoRotation());// 缓存旋转角度
+ } else { // 说明不是第一次播放, 直接取缓存的角度
+ Log.d(TAG, "第一次播放, 获取角度:" + getCacheRotation(jzvd.jzDataSource.getCurrentUrl()));
+ initialRotation = getCacheRotation(jzvd.jzDataSource.getCurrentUrl());
+ }
+ }
+
+ if (initialRotation != aliyunMediaPlayer.getVideoRotation()) { // 如果当前角度与初始化角度不同, 应使用初始化角度
+ Log.d(TAG, "角度应旋转:" + initialRotation);
+ Jzvd.setTextureViewRotation(initialRotation);
+ }
+ }
handler.post(() -> jzvd.onVideoSizeChanged(aliyunMediaPlayer.getVideoWidth(), aliyunMediaPlayer.getVideoHeight()));
}
@@ -274,4 +326,21 @@ public void onLoadingProgress(int percent, float kbps) {
public void onLoadingEnd() {
//缓冲结束
}
+
+ public void saveCacheRotation(Object url, int rotation) {
+ if (jzvd == null)
+ return;
+ SharedPreferences spn = jzvd.getContext().getSharedPreferences("ALIYUN_ROTATION",
+ Context.MODE_PRIVATE);
+ SharedPreferences.Editor editor = spn.edit();
+ editor.putInt("rotate:" + url.toString(), rotation).apply();
+ }
+
+ public int getCacheRotation(Object url) {
+ if (jzvd == null)
+ return -1;
+ SharedPreferences spn = jzvd.getContext().getSharedPreferences("ALIYUN_ROTATION",
+ Context.MODE_PRIVATE);
+ return spn.getInt("rotate:" + url.toString(), -1);
+ }
}
From e589b73397af3a65488cca4c7a2c198af2583766 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Sun, 25 Oct 2020 21:38:14 +0800
Subject: [PATCH 19/52] jzvd.org
---
README.md | 2 +-
docs/index.md | 107 ---------------------------------------------
docs/quickstart.md | 0
3 files changed, 1 insertion(+), 108 deletions(-)
delete mode 100644 docs/index.md
delete mode 100644 docs/quickstart.md
diff --git a/README.md b/README.md
index 316da79b..03d8da76 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
高度自定义的安卓视频框架
-[中文文档](https://jzvd.github.io/JZVideo/)
+[中文文档](http://jzvd.org)
[下载Demo](https://github.com/Jzvd/JZVideo/releases/download/v7.5.0/jiaozivideoplayer-7.5.0.apk)
diff --git a/docs/index.md b/docs/index.md
deleted file mode 100644
index f323af90..00000000
--- a/docs/index.md
+++ /dev/null
@@ -1,107 +0,0 @@
-[饺子视频播放器文档](https://github.com/Jzvd/JZVideo)围绕Demo([点此下载](https://github.com/Jzvd/JZVideo/releases))进行讲解。集成JZVideo之前,看完Demo的每个页面,点击Demo的每个按钮之后,再开始写代码。
-
-## 一、QuickStart
-
-[见GitHub首页](https://github.com/Jzvd/JZVideo)
-
-## 二、初级用法
-
-不需要继承JzvdStd,直接调用JzvdStd暴露的接口和变量。效果见Demo的Tab_1
-
-1.设置视频的填充模式 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/RotationVideoSizeActivity.java)
-
-```
-Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_ADAPTER);
-Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_PARENT);
-Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_SCROP);
-Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_ORIGINAL);
-```
-
-2.设置视频的方向 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/RotationVideoSizeActivity.java)
-
-```
-Jzvd.setTextureViewRotation(90); //0 - 360 旋转的角度
-```
-
-3.切换播放内核 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java),选择适合项目的播放内核。
-
-```
-//Demo提供了四个播放内核。JZMediaAliyun,JZMediaIjk.class,JZMediaSystem.class,JZMediaExo.class,通过如下两种方式使用。
-jzvdStd.setUp("http://url.mp4", "title", JzvdStd.SCREEN_NORMAL, **.class);
-or
-jzvdStd.setMediaInterface(**.class);
-```
-
-4.分别设置非全屏和全屏后的屏幕方向 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java#L41)
-
-```
-Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;// 非全屏是横屏
-Jzvd.NORMAL_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;// 进入全屏后是竖屏
-```
-
-5.根据传感器自动旋转屏幕进入全屏 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/ScreenRotateActivity.java)
-
-```
-@Override
-public void orientationChange(int orientation) {
- if (orientation >= 45 && orientation <= 315 && mJzvdStd.screen == Jzvd.SCREEN_NORMAL) {
- changeScreenFullLandscape(ScreenRotateUtils.orientationDirection);
- } else if (((orientation >= 0 && orientation < 45) || orientation > 315) && mJzvdStd.screen == Jzvd.SCREEN_FULLSCREEN) {
- changeScrenNormal();
- }
-}
-```
-
-6.预加载 [进入源码]()
-
-```
-jzvdStd.startPreloading(); //开始预加载,加载完等待播放
-jzvdStd.startVideoAfterPreloading(); //如果预加载完会开始播放,如果未加载则开始加载
-```
-
-## 三、继承JzvdStd
-
-灵活实现更多自定义功能和UI,效果见Demo的Tab_2
-
-- AgVideo 完全自定义UI [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java)
-
-1.继承JzvdStd后删除不需要的父类控件 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStdNoTitleNoClarity.java)
-
-2.全屏锁 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdLockScreen.java)
-
-3.全屏时显示分享按钮 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowShareButtonAfterFullscreen.java)
-
-4.全屏时显示title,非全屏隐藏title [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTitleAfterFullscreen.java)
-
-5.播放完毕后不隐藏TextureView显示视频的最后一帧 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTextureViewAfterAutoComplete.java)
-
-6.全屏播放完成不退出全屏 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoCompleteAfterFullscreen.java)
-
-7.设置视频高宽比例 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java#L111)
-
-8.非全屏静音,全屏之后有声音 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdVolumeAfterFullscreen.java)
-
-9.全屏显示静音按钮 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdVolume.java)
-
-10.播放mp3 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdMp3.java)
-
-11.倍速播放 [进入源码](https://github.com/Jzvd/JZVideo/blob/develop/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdSpeed.java)
-
-## 四、列表的使用
-
-推荐RecycleView,不推荐ListView
-
-## 五、进阶用法
-
-1.AgVideo 完全自定义UI
-
-2.详情页穿透
-
-3.Gif截图
-
-4.列表自动播放
-
-5.仿抖音UI
-
-6.小窗播
-
diff --git a/docs/quickstart.md b/docs/quickstart.md
deleted file mode 100644
index e69de29b..00000000
From 7d4afdfb5a6dbd90174dfb8a849a1d06546b1ea9 Mon Sep 17 00:00:00 2001
From: xuenhao <569283950@qq.com>
Date: Thu, 19 Nov 2020 13:18:17 +0800
Subject: [PATCH 20/52] doubleclick and jzvdRound
---
.../cn/jzvd/demo/CustomJzvd/JzvdStdRound.java | 87 +++++++++++++++++++
.../java/cn/jzvd/demo/Fragment_2_Custom.java | 7 ++
demo/src/main/res/layout/fragment_custom.xml | 14 +++
demo/src/main/res/values-zh/strings.xml | 1 +
demo/src/main/res/values/attrs.xml | 12 +++
demo/src/main/res/values/strings.xml | 1 +
library/src/main/java/cn/jzvd/JzvdStd.java | 56 ++++++------
7 files changed, 151 insertions(+), 27 deletions(-)
create mode 100644 demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdRound.java
create mode 100644 demo/src/main/res/values/attrs.xml
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdRound.java b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdRound.java
new file mode 100644
index 00000000..93e7fc1e
--- /dev/null
+++ b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdRound.java
@@ -0,0 +1,87 @@
+package cn.jzvd.demo.CustomJzvd;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.PaintFlagsDrawFilter;
+import android.graphics.Path;
+import android.graphics.RectF;
+import android.util.AttributeSet;
+
+import java.util.UUID;
+
+import cn.jzvd.JzvdStd;
+import cn.jzvd.demo.R;
+
+public class JzvdStdRound extends JzvdStd {
+
+ private int radius;
+ private int leftTopRadius;
+ private int rightTopRadius;
+ private int rightBottomRadius;
+ private int leftBottomRadius;
+ public JzvdStdRound(Context context) {
+ super(context);
+ }
+ public JzvdStdRound(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ initAttrs(context, attrs);
+ }
+
+ void initAttrs(Context context, AttributeSet attrs) {
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.JzvdStdRound);
+ radius = a.getDimensionPixelSize(R.styleable.JzvdStdRound_radius, 0);
+ leftTopRadius = a.getDimensionPixelSize(R.styleable.JzvdStdRound_left_top_radius, 0);
+ rightTopRadius = a.getDimensionPixelSize(R.styleable.JzvdStdRound_right_top_radius, 0);
+ rightBottomRadius = a.getDimensionPixelSize(R.styleable.JzvdStdRound_right_bottom_radius, 0);
+ leftBottomRadius = a.getDimensionPixelSize(R.styleable.JzvdStdRound_left_bottom_radius, 0);
+ }
+
+
+ public void setRadius(int radius){
+ this.radius = radius;
+ invalidate();
+ }
+
+ public void setLeftTopRadius(int leftTopRadius) {
+ this.leftTopRadius = leftTopRadius;
+ invalidate();
+ }
+
+
+ public void setRightTopRadius(int rightTopRadius) {
+ this.rightTopRadius = rightTopRadius;
+ invalidate();
+ }
+
+
+ public void setRightBottomRadius(int rightBottomRadius) {
+ this.rightBottomRadius = rightBottomRadius;
+ invalidate();
+ }
+
+ public void setLeftBottomRadius(int leftBottomRadius) {
+ this.leftBottomRadius = leftBottomRadius;
+ invalidate();
+ }
+
+ @Override
+ protected void dispatchDraw(Canvas canvas) {
+ Path path = new Path();
+ if (radius > 0) {
+ path.addRoundRect(new RectF(0, 0, getMeasuredWidth(), getMeasuredHeight()),
+ radius, radius, Path.Direction.CW);
+ } else {
+ path.addRoundRect(new RectF(0, 0, getMeasuredWidth(), getMeasuredHeight()),
+ new float[]{leftTopRadius, leftTopRadius, rightTopRadius, rightTopRadius,
+ rightBottomRadius, rightBottomRadius, leftBottomRadius, leftBottomRadius},
+ Path.Direction.CW);
+ canvas.setDrawFilter(new PaintFlagsDrawFilter(0,
+ Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG));
+ }
+ canvas.clipPath(path);
+ super.dispatchDraw(canvas);
+ }
+}
+
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java b/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
index 46de9f8f..13c2f802 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
@@ -14,6 +14,7 @@
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
+import cn.jzvd.demo.CustomJzvd.JzvdStdRound;
import cn.jzvd.demo.Tab_2_Custom.AGVideo.AGVideoActivity;
import cn.jzvd.demo.CustomJzvd.JzvdStdAutoCompleteAfterFullscreen;
import cn.jzvd.demo.CustomJzvd.JzvdStdLockScreen;
@@ -40,6 +41,7 @@ public class Fragment_2_Custom extends Fragment implements View.OnClickListener
JzvdStdSpeed jzvdStdSpeed;
JzvdStdLockScreen lockScreen;
JzvdStdVolume jzvdStdVolume;
+ JzvdStdRound jzvdStdRound;
JzvdStd jzvdStd_1_1, jzvdStd_16_9;
JzvdStd jzNoTitle;
@@ -53,6 +55,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
agVideo = view.findViewById(R.id.agvideo);
jzNoTitle = view.findViewById(R.id.jz_notitle);
lockScreen = view.findViewById(R.id.lock_screen);
+ jzvdStdRound = view.findViewById(R.id.jz_round);
jzvdStdWithShareButton = view.findViewById(R.id.custom_videoplayer_standard_with_share_button);
jzvdStdShowTitleAfterFullscreen = view.findViewById(R.id.custom_videoplayer_standard_show_title_after_fullscreen);
jzvdStdShowTextureViewAfterAutoComplete = view.findViewById(R.id.custom_videoplayer_standard_show_textureview_aoto_complete);
@@ -73,6 +76,10 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
+ jzvdStdRound.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
+ , "饺子圆角");
+ Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(jzvdStdRound.posterImageView);
+
jzNoTitle.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
, "饺子叫啥也显示不出来啊");
diff --git a/demo/src/main/res/layout/fragment_custom.xml b/demo/src/main/res/layout/fragment_custom.xml
index 9052d581..970bc48a 100644
--- a/demo/src/main/res/layout/fragment_custom.xml
+++ b/demo/src/main/res/layout/fragment_custom.xml
@@ -2,6 +2,7 @@
+
+
+
+
+
视频根据传感器自动进入和退出全屏
Gif截图
继承JzvdStd删除父布局的一些控件
+ JzvdStd圆角
继承JzvdStd删除父布局的一些控件并添加锁定按钮
JzvdStd上添加分享按钮全屏播放时显示
JzvdStd全屏播放时显示视频标题
diff --git a/demo/src/main/res/values/attrs.xml b/demo/src/main/res/values/attrs.xml
new file mode 100644
index 00000000..4e6f788c
--- /dev/null
+++ b/demo/src/main/res/values/attrs.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/src/main/res/values/strings.xml b/demo/src/main/res/values/strings.xml
index 45e67445..ab6f664c 100644
--- a/demo/src/main/res/values/strings.xml
+++ b/demo/src/main/res/values/strings.xml
@@ -12,6 +12,7 @@
Preloading
Screen Rotate
Get Gif
+ JzvdStd Round
extends JzvdStd and delete some parent views
Standard ui but delete some parent views and add lock button
Standard ui with share button, visible after fullscreen
diff --git a/library/src/main/java/cn/jzvd/JzvdStd.java b/library/src/main/java/cn/jzvd/JzvdStd.java
index a23f7af0..98812b00 100644
--- a/library/src/main/java/cn/jzvd/JzvdStd.java
+++ b/library/src/main/java/cn/jzvd/JzvdStd.java
@@ -11,6 +11,7 @@
import android.net.ConnectivityManager;
import android.util.AttributeSet;
import android.util.Log;
+import android.view.GestureDetector;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -100,9 +101,6 @@ public void onReceive(Context context, Intent intent) {
}
}
};
- //doublClick 这两个全局变量只在ontouch中使用,就近放置便于阅读
- protected long lastClickTime = 0;
- protected long doubleTime = 200;
protected ArrayDeque delayTask = new ArrayDeque<>();
public JzvdStd(Context context) {
@@ -267,6 +265,33 @@ public void startVideo() {
registerWifiListener(getApplicationContext());
}
+ /**
+ * 双击
+ */
+ protected GestureDetector gestureDetector = new GestureDetector(getContext().getApplicationContext(), new GestureDetector.SimpleOnGestureListener() {
+ @Override
+ public boolean onDoubleTap(MotionEvent e) {
+ if (state == STATE_PLAYING || state == STATE_PAUSE) {
+ Log.d(TAG, "doublClick [" + this.hashCode() + "] ");
+ startButton.performClick();
+ }
+ return super.onDoubleTap(e);
+ }
+
+ @Override
+ public boolean onSingleTapConfirmed(MotionEvent e) {
+ if (!mChangePosition && !mChangeVolume) {
+ onClickUiToggle();
+ }
+ return super.onSingleTapConfirmed(e);
+ }
+
+ @Override
+ public void onLongPress(MotionEvent e) {
+ super.onLongPress(e);
+ }
+ });
+
@Override
public boolean onTouch(View v, MotionEvent event) {
int id = v.getId();
@@ -282,32 +307,9 @@ public boolean onTouch(View v, MotionEvent event) {
int progress = (int) (mSeekTimePosition * 100 / (duration == 0 ? 1 : duration));
bottomProgressBar.setProgress(progress);
}
-
- //加上延时是为了判断点击是否是双击之一,双击不执行这个逻辑
- Runnable task = () -> {
- if (!mChangePosition && !mChangeVolume) {
- onClickUiToggle();
- }
- };
- v.postDelayed(task, doubleTime + 20);
- delayTask.add(task);
- while (delayTask.size() > 2) {
- delayTask.pollFirst();
- }
-
- long currentTimeMillis = System.currentTimeMillis();
- if (currentTimeMillis - lastClickTime < doubleTime) {
- for (Runnable taskItem : delayTask) {
- v.removeCallbacks(taskItem);
- }
- if (state == STATE_PLAYING || state == STATE_PAUSE) {
- Log.d(TAG, "doublClick [" + this.hashCode() + "] ");
- startButton.performClick();
- }
- }
- lastClickTime = currentTimeMillis;
break;
}
+ gestureDetector.onTouchEvent(event);
} else if (id == R.id.bottom_seek_progress) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
From bc2152c913f8c93821cb9661ebfd0e86355d56f0 Mon Sep 17 00:00:00 2001
From: Liberations <1487098940@qq.com>
Date: Mon, 30 Nov 2020 14:44:58 +0800
Subject: [PATCH 21/52] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=B9=E6=8D=AE?=
=?UTF-8?q?=E8=A7=86=E9=A2=91=E5=AE=BD=E9=AB=98=E8=87=AA=E9=80=82=E5=BA=94?=
=?UTF-8?q?=E5=85=A8=E5=B1=8F=E6=96=B9=E5=90=91Demo?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../demo/CustomJzvd/JzvdStdAutoOrizental.java | 40 +++++++++++++++++++
.../java/cn/jzvd/demo/Fragment_2_Custom.java | 6 +++
demo/src/main/res/layout/fragment_custom.xml | 9 +++++
demo/src/main/res/values-zh/strings.xml | 1 +
demo/src/main/res/values/strings.xml | 1 +
5 files changed, 57 insertions(+)
create mode 100644 demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoOrizental.java
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoOrizental.java b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoOrizental.java
new file mode 100644
index 00000000..67c187f4
--- /dev/null
+++ b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoOrizental.java
@@ -0,0 +1,40 @@
+package cn.jzvd.demo.CustomJzvd;
+
+import android.content.Context;
+import android.content.pm.ActivityInfo;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.View;
+
+import androidx.annotation.LongDef;
+
+import cn.jzvd.Jzvd;
+import cn.jzvd.JzvdStd;
+import cn.jzvd.demo.R;
+
+/**
+ * 根据视频宽高自适应全屏方向
+ */
+public class JzvdStdAutoOrizental extends JzvdStd {
+
+ public JzvdStdAutoOrizental(Context context) {
+ super(context);
+ }
+
+ public JzvdStdAutoOrizental(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+
+ @Override
+ public void onVideoSizeChanged(int width, int height) {
+ super.onVideoSizeChanged(width, height);
+ if (width > 0 && height > 0) {
+ if (height > width) {
+ Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
+ } else {
+ Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
+ }
+ }
+ }
+}
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java b/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
index 13c2f802..060c5d7d 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
@@ -14,6 +14,7 @@
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
+import cn.jzvd.demo.CustomJzvd.JzvdStdAutoOrizental;
import cn.jzvd.demo.CustomJzvd.JzvdStdRound;
import cn.jzvd.demo.Tab_2_Custom.AGVideo.AGVideoActivity;
import cn.jzvd.demo.CustomJzvd.JzvdStdAutoCompleteAfterFullscreen;
@@ -42,6 +43,7 @@ public class Fragment_2_Custom extends Fragment implements View.OnClickListener
JzvdStdLockScreen lockScreen;
JzvdStdVolume jzvdStdVolume;
JzvdStdRound jzvdStdRound;
+ JzvdStdAutoOrizental jzvdStdAutoOrizental;
JzvdStd jzvdStd_1_1, jzvdStd_16_9;
JzvdStd jzNoTitle;
@@ -66,6 +68,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
jzvdStdMp3 = view.findViewById(R.id.jz_videoplayer_mp3);
jzvdStdSpeed = view.findViewById(R.id.jz_videoplayer_speed);
jzvdStdVolume = view.findViewById(R.id.custom_videoplayer_standard_with_volume_button);
+ jzvdStdAutoOrizental = view.findViewById(R.id.jz_auto_oriental);
agVideo.setOnClickListener(this);
return view;
@@ -75,6 +78,9 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
+ jzvdStdAutoOrizental.setUp("https://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
+ , "饺子大小任意");
+ Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(jzvdStdAutoOrizental.posterImageView);
jzvdStdRound.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
, "饺子圆角");
diff --git a/demo/src/main/res/layout/fragment_custom.xml b/demo/src/main/res/layout/fragment_custom.xml
index 970bc48a..3a5025b7 100644
--- a/demo/src/main/res/layout/fragment_custom.xml
+++ b/demo/src/main/res/layout/fragment_custom.xml
@@ -22,7 +22,16 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:text="@string/agplayer" />
+
+
视频根据传感器自动进入和退出全屏
Gif截图
继承JzvdStd删除父布局的一些控件
+ JZVD根据视频宽高自适应全屏方向
JzvdStd圆角
继承JzvdStd删除父布局的一些控件并添加锁定按钮
JzvdStd上添加分享按钮全屏播放时显示
diff --git a/demo/src/main/res/values/strings.xml b/demo/src/main/res/values/strings.xml
index ab6f664c..3a04b781 100644
--- a/demo/src/main/res/values/strings.xml
+++ b/demo/src/main/res/values/strings.xml
@@ -12,6 +12,7 @@
Preloading
Screen Rotate
Get Gif
+ JZVD auto orientation
JzvdStd Round
extends JzvdStd and delete some parent views
Standard ui but delete some parent views and add lock button
From bd42381e9dbae5b08571dcaea8f7ec4001e7c574 Mon Sep 17 00:00:00 2001
From: Liberations <1487098940@qq.com>
Date: Mon, 30 Nov 2020 14:48:47 +0800
Subject: [PATCH 22/52] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=98=BF=E9=87=8C?=
=?UTF-8?q?=E4=BA=91=E6=BA=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
build.gradle | 3 +++
1 file changed, 3 insertions(+)
diff --git a/build.gradle b/build.gradle
index e2f91af2..2b97a1aa 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,6 +3,7 @@
buildscript {
ext.kotlin_version = '1.4.10'
repositories {
+ maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
jcenter()
google()
maven { url 'https://maven.aliyun.com/repository/releases' }
@@ -18,6 +19,8 @@ buildscript {
allprojects {
repositories {
+ maven { url "https://maven.aliyun.com/repository/public" } //jcenter
+ maven { url "https://maven.aliyun.com/repository/google" } //google
jcenter()
google()
maven { url "https://jitpack.io" }
From d78937805fc9830193da7b422db75198cc1eb1d7 Mon Sep 17 00:00:00 2001
From: Liberations <1487098940@qq.com>
Date: Mon, 30 Nov 2020 15:47:28 +0800
Subject: [PATCH 23/52] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=92=AD=E6=94=BE?=
=?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E6=89=8B=E5=8A=BF=E6=BB=91=E5=8A=A8?=
=?UTF-8?q?=E9=98=BB=E5=B0=BC=E7=B3=BB=E6=95=B0=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java | 1 +
library/src/main/java/cn/jzvd/Jzvd.java | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
index ad4747df..f74d6552 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
@@ -78,6 +78,7 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
jzDataSource.headerMap.put("key", "value");//header
mJzvdStd.setUp(jzDataSource
, JzvdStd.SCREEN_NORMAL);
+ Jzvd.PROGRESS_DRAG_RATE = 2f;//设置播放进度条手势滑动阻尼系数
Glide.with(this).load(Urls.videoPosterList[0]).into(mJzvdStd.posterImageView);
}
diff --git a/library/src/main/java/cn/jzvd/Jzvd.java b/library/src/main/java/cn/jzvd/Jzvd.java
index 6241368f..59db48e3 100644
--- a/library/src/main/java/cn/jzvd/Jzvd.java
+++ b/library/src/main/java/cn/jzvd/Jzvd.java
@@ -66,6 +66,7 @@ public abstract class Jzvd extends FrameLayout implements View.OnClickListener,
public static long lastAutoFullscreenTime = 0;
public static int ON_PLAY_PAUSE_TMP_STATE = 0;//这个考虑不放到库里,去自定义
public static int backUpBufferState = -1;
+ public static float PROGRESS_DRAG_RATE = 1f;//进度条滑动阻尼系数 越大播放进度条滑动越慢
public static AudioManager.OnAudioFocusChangeListener onAudioFocusChangeListener = new AudioManager.OnAudioFocusChangeListener() {//是否新建个class,代码更规矩,并且变量的位置也很尴尬
@Override
public void onAudioFocusChange(int focusChange) {
@@ -474,7 +475,11 @@ protected void touchActionMove(float x, float y) {
}
if (mChangePosition) {
long totalTimeDuration = getDuration();
- mSeekTimePosition = (int) (mGestureDownPosition + deltaX * totalTimeDuration / mScreenWidth);
+ if (PROGRESS_DRAG_RATE <= 0) {
+ Log.d(TAG, "error PROGRESS_DRAG_RATE value");
+ PROGRESS_DRAG_RATE = 1f;
+ }
+ mSeekTimePosition = (int) (mGestureDownPosition + deltaX * totalTimeDuration / (mScreenWidth * PROGRESS_DRAG_RATE));
if (mSeekTimePosition > totalTimeDuration)
mSeekTimePosition = totalTimeDuration;
String seekTime = JZUtils.stringForTime(mSeekTimePosition);
From f038da2c3f17c0c07fc763f8a45b7686a79e0ba2 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Mon, 30 Nov 2020 21:56:21 +0800
Subject: [PATCH 24/52] change rotation url
---
demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java b/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
index 060c5d7d..24a1adb2 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
@@ -78,7 +78,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
- jzvdStdAutoOrizental.setUp("https://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
+ jzvdStdAutoOrizental.setUp("http://jzvd.nathen.cn/384d341e000145fb82295bdc54ecef88/103eab5afca34baebc970378dd484942-5287d2089db37e62345123a1be272f8b.mp4"
, "饺子大小任意");
Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(jzvdStdAutoOrizental.posterImageView);
From cf8f6173a775de6066e0d95917ceb880f709f8cb Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Mon, 30 Nov 2020 23:15:43 +0800
Subject: [PATCH 25/52] upgrade env
---
build.gradle | 7 ++-----
gradle/wrapper/gradle-wrapper.properties | 2 +-
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/build.gradle b/build.gradle
index 2b97a1aa..afd0c3d7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = '1.4.10'
+ ext.kotlin_version = '1.4.20'
repositories {
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
jcenter()
@@ -9,11 +9,8 @@ buildscript {
maven { url 'https://maven.aliyun.com/repository/releases' }
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.1.0'
+ classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index b4354590..4431b482 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,4 +1,4 @@
-#Wed Oct 14 08:09:22 CST 2020
+#Mon Nov 30 23:07:54 CST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
From 2f977503a29a0c810cebfe557a3dcc9e4af06d38 Mon Sep 17 00:00:00 2001
From: Liberations <1487098940@qq.com>
Date: Tue, 1 Dec 2020 09:39:44 +0800
Subject: [PATCH 26/52] reset screen orientation
---
.../java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoOrizental.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoOrizental.java b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoOrizental.java
index 67c187f4..9c194932 100644
--- a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoOrizental.java
+++ b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdAutoOrizental.java
@@ -37,4 +37,11 @@ public void onVideoSizeChanged(int width, int height) {
}
}
}
+
+ @Override
+ public void reset() {
+ super.reset();
+ Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
+ Jzvd.NORMAL_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
+ }
}
From 5f9fc8a98db43dbda0bfec3a84e7f46da6f12082 Mon Sep 17 00:00:00 2001
From: Liberations <1487098940@qq.com>
Date: Tue, 1 Dec 2020 10:14:46 +0800
Subject: [PATCH 27/52] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E9=98=BF=E9=87=8C?=
=?UTF-8?q?=E4=BA=91=E6=BA=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
build.gradle | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/build.gradle b/build.gradle
index afd0c3d7..57f1f60d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,9 +3,8 @@
buildscript {
ext.kotlin_version = '1.4.20'
repositories {
- maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
- jcenter()
- google()
+ maven { url 'https://maven.aliyun.com/repository/public/' }
+ maven { url "https://maven.aliyun.com/repository/google" }
maven { url 'https://maven.aliyun.com/repository/releases' }
}
dependencies {
@@ -16,12 +15,9 @@ buildscript {
allprojects {
repositories {
- maven { url "https://maven.aliyun.com/repository/public" } //jcenter
- maven { url "https://maven.aliyun.com/repository/google" } //google
- jcenter()
- google()
maven { url "https://jitpack.io" }
- maven { url "https://maven.google.com" }
+ maven { url "https://maven.aliyun.com/repository/public" }
+ maven { url "https://maven.aliyun.com/repository/google" }
maven { url 'https://maven.aliyun.com/repository/releases' }
}
}
From d106ece5bb8f10032bdd66363a4b3be46fb95eb1 Mon Sep 17 00:00:00 2001
From: Liberations <1487098940@qq.com>
Date: Tue, 1 Dec 2020 17:09:18 +0800
Subject: [PATCH 28/52] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BC=B9=E5=B9=95Demo?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
demo/build.gradle | 4 +
demo/src/main/AndroidManifest.xml | 4 +
.../cn/jzvd/demo/CustomJzvd/JzvdDanmu.java | 240 +++++++++++++++++
.../java/cn/jzvd/demo/Fragment_4_More.java | 8 +-
.../jzvd/demo/Tab_4_More/DanmuActivity.java | 137 ++++++++++
.../cn/jzvd/demo/utils/CenteredImageSpan.java | 50 ++++
demo/src/main/res/layout/activity_danmu.xml | 36 +++
demo/src/main/res/layout/fragment_more.xml | 9 +-
demo/src/main/res/layout/jz_layout_danmu.xml | 251 ++++++++++++++++++
demo/src/main/res/values-zh/strings.xml | 7 +
demo/src/main/res/values/strings.xml | 7 +
11 files changed, 751 insertions(+), 2 deletions(-)
create mode 100644 demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdDanmu.java
create mode 100644 demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java
create mode 100644 demo/src/main/java/cn/jzvd/demo/utils/CenteredImageSpan.java
create mode 100644 demo/src/main/res/layout/activity_danmu.xml
create mode 100644 demo/src/main/res/layout/jz_layout_danmu.xml
diff --git a/demo/build.gradle b/demo/build.gradle
index a352a4da..e92d7ed6 100644
--- a/demo/build.gradle
+++ b/demo/build.gradle
@@ -10,6 +10,7 @@ android {
targetSdkVersion 30
versionCode 105
versionName "7.5.0"
+ multiDexEnabled true
ndk {
// add support lib
abiFilters 'armeabi-v7a' //, 'arm64-v8a'//, "mips" //,'armeabi''x86',, 'x86_64',
@@ -64,4 +65,7 @@ dependencies {
implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.4'
implementation 'com.aliyun.sdk.android:AliyunPlayer:4.5.0-full'
implementation 'com.alivc.conan:AlivcConan:0.9.5'
+ implementation 'com.github.ctiao:DanmakuFlameMaster:0.9.25'
+ implementation 'com.github.ctiao:ndkbitmap-armv7a:0.9.21'
+
}
diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml
index 2d567c9e..9b545629 100644
--- a/demo/src/main/AndroidManifest.xml
+++ b/demo/src/main/AndroidManifest.xml
@@ -110,6 +110,10 @@
android:name=".Tab_3_List.GetGifActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
+
\ No newline at end of file
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdDanmu.java b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdDanmu.java
new file mode 100644
index 00000000..9a8c1d2a
--- /dev/null
+++ b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdDanmu.java
@@ -0,0 +1,240 @@
+package cn.jzvd.demo.CustomJzvd;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.RectF;
+import android.graphics.drawable.Drawable;
+import android.text.Spannable;
+import android.text.SpannableStringBuilder;
+import android.text.TextPaint;
+import android.util.AttributeSet;
+import android.util.Log;
+
+import androidx.core.content.ContextCompat;
+
+import cn.jzvd.JzvdStd;
+import cn.jzvd.demo.BuildConfig;
+import cn.jzvd.demo.R;
+import cn.jzvd.demo.utils.DipAndPx;
+import master.flame.danmaku.controller.DrawHandler;
+import master.flame.danmaku.danmaku.model.BaseDanmaku;
+import master.flame.danmaku.danmaku.model.DanmakuTimer;
+import master.flame.danmaku.danmaku.model.IDanmakus;
+import master.flame.danmaku.danmaku.model.IDisplayer;
+import master.flame.danmaku.danmaku.model.android.DanmakuContext;
+import master.flame.danmaku.danmaku.model.android.Danmakus;
+import master.flame.danmaku.danmaku.model.android.SpannedCacheStuffer;
+import master.flame.danmaku.danmaku.parser.BaseDanmakuParser;
+import master.flame.danmaku.ui.widget.DanmakuView;
+import cn.jzvd.demo.utils.CenteredImageSpan;
+
+import java.util.HashMap;
+
+public class JzvdDanmu extends JzvdStd {
+ public DanmakuView danmakuView;
+ private DanmakuContext danmakuContext;
+ private BaseDanmakuParser danmakuParser;
+
+
+ public JzvdDanmu(Context context) {
+ super(context);
+ }
+
+ public JzvdDanmu(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public int getLayoutId() {
+ return R.layout.jz_layout_danmu;
+ }
+
+ @Override
+ public void init(Context context) {
+ super.init(context);
+ danmakuView = findViewById(R.id.jz_danmu);
+ HashMap overlappingEnablePair = new HashMap();
+ overlappingEnablePair.put(BaseDanmaku.TYPE_SCROLL_RL, true);
+ overlappingEnablePair.put(BaseDanmaku.TYPE_FIX_TOP, true);
+ HashMap maxLinesPair = new HashMap();
+ maxLinesPair.put(BaseDanmaku.TYPE_SCROLL_RL, 5); // 滚动弹幕最大显示5行,可设置多种类型限制行数
+ danmakuContext = DanmakuContext.create();
+ danmakuContext.setDanmakuStyle(IDisplayer.DANMAKU_STYLE_STROKEN, 3)
+ .setDuplicateMergingEnabled(false)
+ .setScrollSpeedFactor(1.2f)
+ .setScaleTextSize(1.2f)
+ .setMaximumLines(maxLinesPair)
+ .preventOverlapping(overlappingEnablePair).setDanmakuMargin(40);
+ danmakuParser = new BaseDanmakuParser() {
+ @Override
+ protected IDanmakus parse() {
+ return new Danmakus();
+ }
+ };
+ danmakuView.setCallback(new DrawHandler.Callback() {
+ @Override
+ public void prepared() {
+ danmakuView.start();
+ }
+
+ @Override
+ public void updateTimer(DanmakuTimer timer) {
+
+ }
+
+ @Override
+ public void danmakuShown(BaseDanmaku danmaku) {
+
+ }
+
+ @Override
+ public void drawingFinished() {
+
+ }
+ });
+ danmakuView.showFPS(BuildConfig.DEBUG);
+ danmakuView.enableDanmakuDrawingCache(true);
+ }
+
+ //onState 代表了播放器引擎的回调,播放视频各个过程的状态的回调
+ @Override
+ public void onStateNormal() {
+ super.onStateNormal();
+ }
+
+ @Override
+ public void onStatePreparing() {
+ super.onStatePreparing();
+ }
+
+ @Override
+ public void onStatePlaying() {
+ super.onStatePlaying();
+ if (danmakuView.isPrepared()) {
+ danmakuView.restart();
+ }
+ danmakuView.prepare(danmakuParser, danmakuContext);
+ }
+
+ @Override
+ public void onStatePause() {
+ super.onStatePause();
+ if (danmakuView.isPrepared()) {
+ danmakuView.pause();
+ }
+ }
+
+ public void releaseDanMu() {
+ danmakuView.release();
+ danmakuView = null;
+ }
+
+ @Override
+ public void onStateError() {
+ super.onStateError();
+ danmakuView.release();
+ }
+
+ @Override
+ public void onStateAutoComplete() {
+ super.onStateAutoComplete();
+ danmakuView.stop();
+ danmakuView.clear();
+ danmakuView.clearDanmakusOnScreen();
+ }
+
+ public void showDanmmu() {
+ danmakuView.show();
+ }
+
+ public void hideDanmmu() {
+ danmakuView.hide();
+ }
+
+ /**
+ * 发送文字弹幕
+ *
+ * @param text 弹幕文字
+ * @param isSelf 是不是自己发的
+ */
+ public void addDanmaku(String text, boolean isSelf) {
+ danmakuContext.setCacheStuffer(new SpannedCacheStuffer(), null);
+ BaseDanmaku danmaku = danmakuContext.mDanmakuFactory.createDanmaku(BaseDanmaku.TYPE_SCROLL_RL);
+ if (danmaku == null) {
+ return;
+ }
+ danmaku.text = text;
+ danmaku.priority = 3;
+ danmaku.isLive = false;
+ danmaku.setTime(danmakuView.getCurrentTime() + 1200);
+ danmaku.textSize = DipAndPx.dip2px(getContext(), isSelf ? 20 : 12);
+ danmaku.textColor = isSelf ? Color.BLUE : Color.WHITE;
+ danmaku.textShadowColor = Color.GRAY;
+ danmaku.underlineColor = isSelf ? Color.GREEN : Color.TRANSPARENT;
+ danmaku.borderColor = isSelf ? Color.GREEN : Color.TRANSPARENT;
+ danmakuView.addDanmaku(danmaku);
+ }
+
+ /**
+ * 发送自定义弹幕
+ */
+ public void addDanmakuWithDrawable() {
+ danmakuContext.setCacheStuffer(new BackgroundCacheStuffer(), null);
+ BaseDanmaku danmaku = danmakuContext.mDanmakuFactory.createDanmaku(BaseDanmaku.TYPE_SCROLL_RL);
+ if (danmaku == null) {
+ return;
+ }
+ Drawable drawable = ContextCompat.getDrawable(getContext(), R.mipmap.ic_launcher);
+ int size = DipAndPx.dip2px(getContext(), 20);
+ drawable.setBounds(0, 0, size, size);
+ danmaku.text = createSpannable(drawable);
+ danmaku.priority = 4; // 可能会被各种过滤器过滤并隐藏显示
+ danmaku.isLive = false;
+ danmaku.setTime(danmakuView.getCurrentTime() + 1200);
+ danmaku.textSize = DipAndPx.dip2px(getContext(), 12);
+ danmaku.textColor = Color.RED;
+ danmaku.textShadowColor = Color.WHITE;
+ danmakuView.addDanmaku(danmaku);
+
+ }
+
+ private SpannableStringBuilder createSpannable(Drawable drawable) {
+ String text = "bitmap";
+ SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(text);
+ CenteredImageSpan span = new CenteredImageSpan(drawable);//ImageSpan.ALIGN_BOTTOM);
+ spannableStringBuilder.setSpan(span, 0, text.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
+ spannableStringBuilder.append(" 自定义弹幕起飞~");
+ return spannableStringBuilder;
+ }
+
+ /**
+ * 绘制背景(自定义弹幕样式)
+ */
+ private class BackgroundCacheStuffer extends SpannedCacheStuffer {
+ // 通过扩展SimpleTextCacheStuffer或SpannedCacheStuffer个性化你的弹幕样式
+ final Paint paint = new Paint();
+
+ @Override
+ public void measure(BaseDanmaku danmaku, TextPaint paint, boolean fromWorkerThread) {
+// danmaku.padding = 5; // 在背景绘制模式下增加padding
+ super.measure(danmaku, paint, fromWorkerThread);
+ }
+
+ @Override
+ public void drawBackground(BaseDanmaku danmaku, Canvas canvas, float left, float top) {
+ paint.setAntiAlias(true);
+ paint.setColor(Color.parseColor("#65777777"));//黑色 普通
+ int radius = DipAndPx.dip2px(getContext(), 10);
+ canvas.drawRoundRect(new RectF(left, top, left + danmaku.paintWidth, top + danmaku.paintHeight), radius, radius, paint);
+ }
+
+ @Override
+ public void drawStroke(BaseDanmaku danmaku, String lineText, Canvas canvas, float left, float top, Paint paint) {
+ // 禁用描边绘制
+ }
+ }
+
+
+}
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_4_More.java b/demo/src/main/java/cn/jzvd/demo/Fragment_4_More.java
index f6bc5394..c442e751 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_4_More.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_4_More.java
@@ -16,6 +16,7 @@
import cn.jzvd.demo.Tab_3_List.GetGifActivity;
import cn.jzvd.demo.Tab_3_List.TinyWindow.TinyWindowActivity;
+import cn.jzvd.demo.Tab_4_More.DanmuActivity;
import cn.jzvd.demo.Tab_4_More.DirectPlayActivity;
import cn.jzvd.demo.Tab_4_More.LocalVideoActivity;
import cn.jzvd.demo.Tab_4_More.WebViewActivity;
@@ -26,7 +27,7 @@
public class Fragment_4_More extends Fragment implements View.OnClickListener {
TextView versionTextView;
- private Button mDirectPlay, mWebView, mLocalVideo, mTinyWindow, mGetGif;
+ private Button mDirectPlay, mWebView, mLocalVideo, mTinyWindow, mGetGif,mDanmu;
public static String getAppVersionName(Context context) {
String appVersionName = "";
@@ -52,6 +53,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
versionTextView = view.findViewById(R.id.version);
mTinyWindow = view.findViewById(R.id.tiny_window);
mGetGif = view.findViewById(R.id.get_gif);
+ mDanmu = view.findViewById(R.id.danmu_view);
mDirectPlay.setOnClickListener(this);
@@ -59,6 +61,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
mLocalVideo.setOnClickListener(this);
mGetGif.setOnClickListener(this);
mTinyWindow.setOnClickListener(this);
+ mDanmu.setOnClickListener(this);
return view;
}
@@ -87,6 +90,9 @@ public void onClick(View view) {
case R.id.get_gif:
startActivity(new Intent(getContext(), GetGifActivity.class));
break;
+ case R.id.danmu_view:
+ startActivity(new Intent(getContext(), DanmuActivity.class));
+ break;
}
}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java
new file mode 100644
index 00000000..6cc283c0
--- /dev/null
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java
@@ -0,0 +1,137 @@
+package cn.jzvd.demo.Tab_4_More;
+
+import android.content.pm.PackageManager;
+import android.os.Bundle;
+import android.os.Environment;
+import android.os.Handler;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.app.ActivityCompat;
+
+import com.bumptech.glide.Glide;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Random;
+
+import cn.jzvd.JZUtils;
+import cn.jzvd.Jzvd;
+import cn.jzvd.JzvdStd;
+import cn.jzvd.demo.CustomJzvd.JzvdDanmu;
+import cn.jzvd.demo.CustomJzvd.JzvdStdAssert;
+import cn.jzvd.demo.CustomMedia.JZMediaSystemAssertFolder;
+import cn.jzvd.demo.R;
+import cn.jzvd.demo.Urls;
+import master.flame.danmaku.ui.widget.DanmakuView;
+
+/**
+ * @author Liberations
+ * @time 2020-12-01
+ * @des 弹幕库 https://github.com/bilibili/DanmakuFlameMaster
+ */
+public class DanmuActivity extends AppCompatActivity implements View.OnClickListener {
+ private JzvdDanmu jzvdDanmu;
+ private Button btnDanmu, btnDiyDanmu,showDanmu,hideDanmu;
+ private Handler handler = new Handler();
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ getSupportActionBar().setDisplayShowHomeEnabled(true);
+ getSupportActionBar().setDisplayShowTitleEnabled(true);
+ getSupportActionBar().setDisplayUseLogoEnabled(false);
+ getSupportActionBar().setTitle(getString(R.string.danmu_show));
+ setContentView(R.layout.activity_danmu);
+ btnDanmu = findViewById(R.id.btn_add_danmu);
+ btnDiyDanmu = findViewById(R.id.btn_diy_danmu);
+ showDanmu = findViewById(R.id.show_danmu);
+ hideDanmu = findViewById(R.id.hide_danmu);
+ jzvdDanmu = findViewById(R.id.jz_danmu_player);
+ btnDanmu.setOnClickListener(this);
+ btnDiyDanmu.setOnClickListener(this);
+ showDanmu.setOnClickListener(this);
+ hideDanmu.setOnClickListener(this);
+
+
+ jzvdDanmu.setUp(Urls.clarities[2], "饺子键盘侠", Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(Urls.videoPosterList[0]).into(jzvdDanmu.posterImageView);
+ testDanmu();
+ jzvdDanmu.startButton.performClick();
+
+ }
+
+ /**
+ * 模拟弹幕
+ */
+ private void testDanmu() {
+ handler.removeCallbacksAndMessages(null);
+ handler.post(new Runnable() {
+ @Override
+ public void run() {
+ jzvdDanmu.addDanmaku("嫂子666", false);
+ handler.postDelayed(this, 100);
+ }
+ });
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+ JZUtils.clearSavedProgress(this, null);
+ Jzvd.releaseAllVideos();
+ }
+
+ @Override
+ public void onBackPressed() {
+ if (Jzvd.backPress()) {
+ return;
+ }
+ super.onBackPressed();
+ jzvdDanmu.releaseDanMu();
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ finish();
+ break;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
+ @Override
+ public void onClick(View view) {
+ switch (view.getId()) {
+ case R.id.show_danmu:
+ jzvdDanmu.showDanmmu();
+ break;
+ case R.id.hide_danmu:
+ jzvdDanmu.hideDanmmu();
+ break;
+ case R.id.btn_add_danmu:
+ jzvdDanmu.addDanmaku("骚还是各位骚呀", true);
+ break;
+ case R.id.btn_diy_danmu:
+ jzvdDanmu.addDanmakuWithDrawable();
+ break;
+ }
+ }
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ handler.removeCallbacksAndMessages(null);
+ jzvdDanmu.releaseDanMu();
+ }
+}
diff --git a/demo/src/main/java/cn/jzvd/demo/utils/CenteredImageSpan.java b/demo/src/main/java/cn/jzvd/demo/utils/CenteredImageSpan.java
new file mode 100644
index 00000000..eb0f51ca
--- /dev/null
+++ b/demo/src/main/java/cn/jzvd/demo/utils/CenteredImageSpan.java
@@ -0,0 +1,50 @@
+package cn.jzvd.demo.utils;
+
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.text.style.ImageSpan;
+
+/**
+ * 图文混排使图片文字基于中线对齐
+ */
+public class CenteredImageSpan extends ImageSpan {
+
+ public CenteredImageSpan(final Drawable drawable) {
+ super(drawable);
+ }
+
+ @Override
+ public int getSize(Paint paint, CharSequence text, int start, int end,
+ Paint.FontMetricsInt fm) {
+ Drawable d = getDrawable();
+ Rect rect = d.getBounds();
+ if (fm != null) {
+ Paint.FontMetricsInt fmPaint = paint.getFontMetricsInt();
+ int fontHeight = fmPaint.bottom - fmPaint.top;
+ int drHeight = rect.bottom - rect.top;
+
+ int top = drHeight / 2 - fontHeight / 4;
+ int bottom = drHeight / 2 + fontHeight / 4;
+
+ fm.ascent = -bottom;
+ fm.top = -bottom;
+ fm.bottom = top;
+ fm.descent = top;
+ }
+ return rect.right;
+ }
+
+ @Override
+ public void draw(Canvas canvas, CharSequence text, int start, int end,
+ float x, int top, int y, int bottom, Paint paint) {
+ Drawable b = getDrawable();
+ canvas.save();
+ int transY;
+ transY = ((bottom - top) - b.getBounds().bottom) / 2 + top;
+ canvas.translate(x, transY);
+ b.draw(canvas);
+ canvas.restore();
+ }
+}
diff --git a/demo/src/main/res/layout/activity_danmu.xml b/demo/src/main/res/layout/activity_danmu.xml
new file mode 100644
index 00000000..c517f309
--- /dev/null
+++ b/demo/src/main/res/layout/activity_danmu.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/src/main/res/layout/fragment_more.xml b/demo/src/main/res/layout/fragment_more.xml
index ca44868a..64e9f972 100644
--- a/demo/src/main/res/layout/fragment_more.xml
+++ b/demo/src/main/res/layout/fragment_more.xml
@@ -46,8 +46,15 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
- android:layout_marginBottom="8dp"
android:text="@string/tiny_window" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/src/main/res/values-zh/strings.xml b/demo/src/main/res/values-zh/strings.xml
index 7fb81f9b..96fb944a 100644
--- a/demo/src/main/res/values-zh/strings.xml
+++ b/demo/src/main/res/values-zh/strings.xml
@@ -60,4 +60,11 @@
播放本地视频
直接全屏播放
直接小窗播放
+ 弹幕
+ 新增一条弹幕
+ 新增自定义弹幕
+ 显示弹幕
+ 隐藏弹幕
+ 清空弹幕
+ 模拟弹幕
\ No newline at end of file
diff --git a/demo/src/main/res/values/strings.xml b/demo/src/main/res/values/strings.xml
index 3a04b781..38d6123d 100644
--- a/demo/src/main/res/values/strings.xml
+++ b/demo/src/main/res/values/strings.xml
@@ -59,4 +59,11 @@
LOCAL VIDEO
Fullscreen
TinyWindow
+ bullet screen
+ add bullet screen
+ diy bullet screen
+ hide bullet screen
+ show bullet screen
+ clear bullet screen
+ test bullet screen
From 2993cbcdbdf05bed232150743f2941598bf5550a Mon Sep 17 00:00:00 2001
From: Liberations <1487098940@qq.com>
Date: Tue, 1 Dec 2020 17:14:24 +0800
Subject: [PATCH 29/52] =?UTF-8?q?=E5=BC=B9=E5=B9=95resume?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/java/cn/jzvd/demo/CustomJzvd/JzvdDanmu.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdDanmu.java b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdDanmu.java
index 9a8c1d2a..27aee22b 100644
--- a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdDanmu.java
+++ b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdDanmu.java
@@ -107,15 +107,19 @@ public void onStateNormal() {
@Override
public void onStatePreparing() {
super.onStatePreparing();
+ if (danmakuView.isPrepared()) {
+ danmakuView.restart();
+ }
+ danmakuView.prepare(danmakuParser, danmakuContext);
}
@Override
public void onStatePlaying() {
super.onStatePlaying();
- if (danmakuView.isPrepared()) {
- danmakuView.restart();
+ if (danmakuView.isPrepared() && danmakuView.isPaused()) {
+ danmakuView.resume();
}
- danmakuView.prepare(danmakuParser, danmakuContext);
+
}
@Override
From 73fe8d07dfac3962b2f7681a7af0a0cbd0c85a44 Mon Sep 17 00:00:00 2001
From: Liberations <1487098940@qq.com>
Date: Tue, 1 Dec 2020 17:19:38 +0800
Subject: [PATCH 30/52] Fix npe
---
demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java
index 6cc283c0..cacb1dd2 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java
@@ -97,7 +97,6 @@ public void onBackPressed() {
return;
}
super.onBackPressed();
- jzvdDanmu.releaseDanMu();
}
@Override
From 50976fb3cc1274ffea0eda1f1dd510da4fafb977 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Tue, 1 Dec 2020 19:54:22 +0800
Subject: [PATCH 31/52] build.gradle
---
build.gradle | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/build.gradle b/build.gradle
index afd0c3d7..15142398 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,10 +3,8 @@
buildscript {
ext.kotlin_version = '1.4.20'
repositories {
- maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
jcenter()
google()
- maven { url 'https://maven.aliyun.com/repository/releases' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
@@ -16,13 +14,11 @@ buildscript {
allprojects {
repositories {
- maven { url "https://maven.aliyun.com/repository/public" } //jcenter
- maven { url "https://maven.aliyun.com/repository/google" } //google
jcenter()
google()
maven { url "https://jitpack.io" }
- maven { url "https://maven.google.com" }
- maven { url 'https://maven.aliyun.com/repository/releases' }
+ maven { url "https://maven.aliyun.com/repository/public" } //jcenter & central
+ maven { url "https://maven.aliyun.com/repository/google" }
}
}
From 0f27fbd5ae3f79051b0cc3fc28a3fec5342e4f9a Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Tue, 1 Dec 2020 20:44:03 +0800
Subject: [PATCH 32/52] build gradle
---
demo/build.gradle | 21 ++++++++++-----------
library/build.gradle | 7 ++-----
2 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/demo/build.gradle b/demo/build.gradle
index e92d7ed6..54411ae7 100644
--- a/demo/build.gradle
+++ b/demo/build.gradle
@@ -48,24 +48,23 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
- testImplementation 'junit:junit:4.12'
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'com.google.android.material:material:1.2.1'
implementation project(':library')
- implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
- implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
+ implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
- implementation 'com.danikula:videocache:2.7.0'
+ implementation 'com.android.support.constraint:constraint-layout:2.0.4'
+ implementation 'com.google.android.material:material:1.2.1'
+ implementation 'com.google.android.exoplayer:exoplayer:2.12.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'
- implementation 'com.google.android.exoplayer:exoplayer:2.11.3'
- debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.3'
- implementation 'com.android.support.constraint:constraint-layout:2.0.1'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.15'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native:1.0.15'
implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.4'
- implementation 'com.aliyun.sdk.android:AliyunPlayer:4.5.0-full'
- implementation 'com.alivc.conan:AlivcConan:0.9.5'
implementation 'com.github.ctiao:DanmakuFlameMaster:0.9.25'
implementation 'com.github.ctiao:ndkbitmap-armv7a:0.9.21'
+ implementation 'com.danikula:videocache:2.7.0'
+ implementation 'com.aliyun.sdk.android:AliyunPlayer:4.5.0-full'
+ implementation 'com.alivc.conan:AlivcConan:0.9.5'
+ implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
+ implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
+ debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.3'
}
diff --git a/library/build.gradle b/library/build.gradle
index 5e66face..602bf142 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -24,11 +24,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "androidx.core:core-ktx:1.3.1"
+ implementation "androidx.core:core-ktx:1.3.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
-apply from: '../gradle/build_upload.gradle'
-repositories {
- mavenCentral()
-}
+apply from: '../gradle/build_upload.gradle'
\ No newline at end of file
From 2602a489def06a94f1f642d6238fdd21e348f87b Mon Sep 17 00:00:00 2001
From: zhoulifeng <337047207@qq.com>
Date: Fri, 4 Dec 2020 11:10:14 +0800
Subject: [PATCH 33/52] =?UTF-8?q?RecycleViewList=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0=E5=92=8C=E4=B8=8A=E6=8B=89?=
=?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8A=A0=E8=BD=BD=E6=9B=B4=E5=A4=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
demo/build.gradle | 3 +
.../ListView/RecyclerViewActivity.java | 103 ++++++++++++++++--
.../ListView/adapter/RecyclerViewAdapter.java | 3 +
.../adapter/RecyclerViewLoadMoreAdapter.java | 64 +++++++++++
.../ListView/entity/VideoEntity.java | 31 ++++++
.../layout/activity_recyclerview_content.xml | 16 ++-
6 files changed, 207 insertions(+), 13 deletions(-)
create mode 100644 demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewLoadMoreAdapter.java
create mode 100644 demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/entity/VideoEntity.java
diff --git a/demo/build.gradle b/demo/build.gradle
index 54411ae7..d174a4c9 100644
--- a/demo/build.gradle
+++ b/demo/build.gradle
@@ -63,6 +63,9 @@ dependencies {
implementation 'com.danikula:videocache:2.7.0'
implementation 'com.aliyun.sdk.android:AliyunPlayer:4.5.0-full'
implementation 'com.alivc.conan:AlivcConan:0.9.5'
+ implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1'
+ implementation 'com.scwang.smart:refresh-header-material:2.0.1'
+ implementation 'com.scwang.smart:refresh-footer-classics:2.0.1'
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.3'
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java
index 9788823a..017b2bfc 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java
@@ -3,23 +3,36 @@
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
+import android.widget.RelativeLayout;
+import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
+import com.scwang.smart.refresh.layout.SmartRefreshLayout;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
+import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
import cn.jzvd.Jzvd;
-import cn.jzvd.demo.Tab_3_List.ListView.adapter.RecyclerViewAdapter;
+import cn.jzvd.demo.Tab_3_List.ListView.adapter.RecyclerViewLoadMoreAdapter;
import cn.jzvd.demo.R;
+import cn.jzvd.demo.Tab_3_List.ListView.entity.VideoEntity;
+import cn.jzvd.demo.Urls;
/**
* Created by yujunkui on 16/8/29.
*/
public class RecyclerViewActivity extends AppCompatActivity {
RecyclerView recyclerView;
- RecyclerViewAdapter adapterVideoList;
-
+ RecyclerViewLoadMoreAdapter adapterVideoList;
+ SmartRefreshLayout refreshLayout;
+ ArrayList videos;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -30,11 +43,12 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
getSupportActionBar().setTitle(getString(R.string.recyclerview));
setContentView(R.layout.activity_recyclerview_content);
- recyclerView = findViewById(R.id.recyclerview);
- recyclerView.setLayoutManager(new LinearLayoutManager(this));
+ initView();
+ initData();
+ initListener();
+ }
- adapterVideoList = new RecyclerViewAdapter(this);
- recyclerView.setAdapter(adapterVideoList);
+ private void initListener() {
recyclerView.addOnChildAttachStateChangeListener(new RecyclerView.OnChildAttachStateChangeListener() {
@Override
public void onChildViewAttachedToWindow(View view) {
@@ -52,6 +66,81 @@ public void onChildViewDetachedFromWindow(View view) {
}
}
});
+
+ refreshLayout.setOnRefreshListener(new OnRefreshListener() {
+ @Override
+ public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+ loadData();
+ }
+ });
+ refreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
+ @Override
+ public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
+ loadMore();
+ }
+ });
+
+ recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
+ @Override
+ public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
+ super.onScrollStateChanged(recyclerView, newState);
+ LinearLayoutManager linearLayoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
+ int lastPositon = linearLayoutManager.findLastVisibleItemPosition();
+ int count = recyclerView.getAdapter().getItemCount();
+ if(newState == RecyclerView.SCROLL_STATE_IDLE && count > 3 && lastPositon >= count - 3){
+ loadMore();
+ }
+ }
+
+ @Override
+ public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
+ super.onScrolled(recyclerView, dx, dy);
+ }
+ });
+ }
+
+ private void initView() {
+ refreshLayout = findViewById(R.id.refreshLayout);
+ recyclerView = findViewById(R.id.recyclerview);
+ }
+
+ private void initData() {
+ videos = new ArrayList<>();
+ addData();
+ recyclerView.setLayoutManager(new LinearLayoutManager(this));
+ adapterVideoList = new RecyclerViewLoadMoreAdapter(this,videos);
+ recyclerView.setAdapter(adapterVideoList);
+ }
+
+ private void addData() {
+ for (int i = 0; i < Urls.videoUrls[0].length; i++) {
+ VideoEntity videoEntity = new VideoEntity();
+ videoEntity.setUrl(Urls.videoUrls[0][i]);
+ videoEntity.setTitle(Urls.videoTitles[0][i]);
+ videoEntity.setThumb(Urls.videoPosters[0][i]);
+ videos.add(videoEntity);
+ }
+ }
+
+ private void loadData() {
+ //模拟网络加载
+ refreshLayout.finishRefresh(1500);
+ videos.clear();
+ addData();
+ //随机打乱
+ Collections.shuffle(videos);
+ adapterVideoList.notifyDataSetChanged();
+ }
+
+ /**
+ * 重复添加数据,模拟加载更多
+ */
+ private void loadMore() {
+ refreshLayout.finishLoadMore(1500);
+ addData();
+ //随机打乱
+ Collections.shuffle(videos);
+ adapterVideoList.notifyDataSetChanged();
}
@Override
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java
index 4fbeddaa..06563580 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java
@@ -11,9 +11,12 @@
import com.bumptech.glide.Glide;
+import java.util.ArrayList;
+
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.R;
+import cn.jzvd.demo.Tab_3_List.ListView.entity.VideoEntity;
import cn.jzvd.demo.Urls;
public class RecyclerViewAdapter extends RecyclerView.Adapter {
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewLoadMoreAdapter.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewLoadMoreAdapter.java
new file mode 100644
index 00000000..aef4d402
--- /dev/null
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewLoadMoreAdapter.java
@@ -0,0 +1,64 @@
+package cn.jzvd.demo.Tab_3_List.ListView.adapter;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.bumptech.glide.Glide;
+
+import java.util.ArrayList;
+
+import cn.jzvd.Jzvd;
+import cn.jzvd.JzvdStd;
+import cn.jzvd.demo.R;
+import cn.jzvd.demo.Tab_3_List.ListView.entity.VideoEntity;
+import cn.jzvd.demo.Urls;
+
+public class RecyclerViewLoadMoreAdapter extends RecyclerView.Adapter {
+
+ public static final String TAG = "RecyclerViewLoadMoreAdapter";
+ ArrayList videos;
+ private Context context;
+
+ public RecyclerViewLoadMoreAdapter(Context context, ArrayList videos) {
+ this.context = context;
+ this.videos = videos;
+ }
+
+ @Override
+ public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+ MyViewHolder holder = new MyViewHolder(LayoutInflater.from(
+ context).inflate(R.layout.item_videoview, parent,
+ false));
+ return holder;
+ }
+
+ @SuppressLint("LongLogTag")
+ @Override
+ public void onBindViewHolder(MyViewHolder holder, int position) {
+ Log.i(TAG, "onBindViewHolder [" + holder.jzvdStd.hashCode() + "] position=" + position);
+ VideoEntity videoEntity = videos.get(position);
+ holder.jzvdStd.setUp(videoEntity.getUrl(), videoEntity.getTitle(), Jzvd.SCREEN_NORMAL);
+ Glide.with(holder.jzvdStd.getContext()).load(videoEntity.getThumb()).into(holder.jzvdStd.posterImageView);
+ }
+
+ @Override
+ public int getItemCount() {
+ return videos.size();
+ }
+
+ class MyViewHolder extends RecyclerView.ViewHolder {
+ JzvdStd jzvdStd;
+
+ public MyViewHolder(View itemView) {
+ super(itemView);
+ jzvdStd = itemView.findViewById(R.id.videoplayer);
+ }
+ }
+
+}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/entity/VideoEntity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/entity/VideoEntity.java
new file mode 100644
index 00000000..28fd3f20
--- /dev/null
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/entity/VideoEntity.java
@@ -0,0 +1,31 @@
+package cn.jzvd.demo.Tab_3_List.ListView.entity;
+
+public class VideoEntity {
+ private String url;
+ private String title;
+ private String thumb;
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getThumb() {
+ return thumb;
+ }
+
+ public void setThumb(String thumb) {
+ this.thumb = thumb;
+ }
+}
diff --git a/demo/src/main/res/layout/activity_recyclerview_content.xml b/demo/src/main/res/layout/activity_recyclerview_content.xml
index b8fd0a76..43c4072b 100644
--- a/demo/src/main/res/layout/activity_recyclerview_content.xml
+++ b/demo/src/main/res/layout/activity_recyclerview_content.xml
@@ -1,13 +1,17 @@
-
-
+ android:layout_height="match_parent">
+
-
-
+
+
From ad3b4f28b39ddf1523e1ba81e8e238bfe86727af Mon Sep 17 00:00:00 2001
From: zhoulifeng <337047207@qq.com>
Date: Fri, 4 Dec 2020 11:46:07 +0800
Subject: [PATCH 34/52] =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E6=9B=B4=E5=A4=9A?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=B7=E6=96=B0=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Tab_3_List/ListView/RecyclerViewActivity.java | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java
index 017b2bfc..182cbb1c 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java
@@ -3,22 +3,17 @@
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
-import android.widget.RelativeLayout;
-
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
-
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.scwang.smart.refresh.layout.api.RefreshLayout;
import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
-
import java.util.ArrayList;
import java.util.Collections;
-
import cn.jzvd.Jzvd;
import cn.jzvd.demo.Tab_3_List.ListView.adapter.RecyclerViewLoadMoreAdapter;
import cn.jzvd.demo.R;
@@ -113,13 +108,17 @@ private void initData() {
}
private void addData() {
+ ArrayList tempList = new ArrayList<>();
for (int i = 0; i < Urls.videoUrls[0].length; i++) {
VideoEntity videoEntity = new VideoEntity();
videoEntity.setUrl(Urls.videoUrls[0][i]);
videoEntity.setTitle(Urls.videoTitles[0][i]);
videoEntity.setThumb(Urls.videoPosters[0][i]);
- videos.add(videoEntity);
+ tempList.add(videoEntity);
}
+ //随机打乱
+ Collections.shuffle(tempList);
+ videos.addAll(tempList);
}
private void loadData() {
@@ -127,8 +126,6 @@ private void loadData() {
refreshLayout.finishRefresh(1500);
videos.clear();
addData();
- //随机打乱
- Collections.shuffle(videos);
adapterVideoList.notifyDataSetChanged();
}
@@ -138,8 +135,6 @@ private void loadData() {
private void loadMore() {
refreshLayout.finishLoadMore(1500);
addData();
- //随机打乱
- Collections.shuffle(videos);
adapterVideoList.notifyDataSetChanged();
}
From 005c3701ec4871b502097102243aff9f1073cb46 Mon Sep 17 00:00:00 2001
From: Nathen <1066666651@qq.com>
Date: Sat, 5 Dec 2020 04:59:18 +0800
Subject: [PATCH 35/52] video urls
---
.../java/cn/jzvd/demo/Fragment_1_Base.java | 4 +-
demo/src/main/java/cn/jzvd/demo/Urls.java | 177 +++++-------------
2 files changed, 51 insertions(+), 130 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
index f74d6552..6556c5a8 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
@@ -70,8 +70,8 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
LinkedHashMap map = new LinkedHashMap();
String proxyUrl = ApplicationDemo.getProxy(getContext()).getProxyUrl(Urls.clarities[0]);
map.put("高清", proxyUrl);
- map.put("标清", Urls.clarities[1]);
- map.put("普清", Urls.clarities[2]);
+ map.put("标清", "http://videos.jzvd.org/ldj/01-ldj.mp4");
+ map.put("普清", "http://videos.jzvd.org/ldj/04-ldj.mp4");
JZDataSource jzDataSource = new JZDataSource(map, "饺子不信");
jzDataSource.looping = true;
jzDataSource.currentUrlIndex = 2;
diff --git a/demo/src/main/java/cn/jzvd/demo/Urls.java b/demo/src/main/java/cn/jzvd/demo/Urls.java
index 275d84ae..48bfb991 100644
--- a/demo/src/main/java/cn/jzvd/demo/Urls.java
+++ b/demo/src/main/java/cn/jzvd/demo/Urls.java
@@ -74,134 +74,55 @@ public class Urls {
};
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"
+ "http://videos.jzvd.org/ldj/01-ldj.mp4",
+ "http://videos.jzvd.org/ldj/02-ldj.mp4",
+ "http://videos.jzvd.org/ldj/03-ldj.mp4",
+ "http://videos.jzvd.org/ldj/04-ldj.mp4",
+ "http://videos.jzvd.org/ldj/05-ldj.mp4",
+ "http://videos.jzvd.org/ldj/06-ldj.mp4",
+ "http://videos.jzvd.org/ldj/07-ldj.mp4",
+ "http://videos.jzvd.org/ldj/08-ldj.mp4",
+ "http://videos.jzvd.org/ldj/09-ldj.mp4",
+
+ "http://videos.jzvd.org/ldj/10-ldj.mp4",
+ "http://videos.jzvd.org/ldj/11-ldj.mp4",
+ "http://videos.jzvd.org/ldj/12-ldj.mp4",
+ "http://videos.jzvd.org/ldj/13-ldj.mp4",
+ "http://videos.jzvd.org/ldj/14-ldj.mp4",
+ "http://videos.jzvd.org/ldj/15-ldj.mp4",
+ "http://videos.jzvd.org/ldj/16-ldj.mp4",
+ "http://videos.jzvd.org/ldj/17-ldj.mp4",
+ "http://videos.jzvd.org/ldj/18-ldj.mp4",
+ "http://videos.jzvd.org/ldj/19-ldj.mp4",
+
+ "http://videos.jzvd.org/ldj/20-ldj.mp4",
+ "http://videos.jzvd.org/ldj/21-ldj.mp4",
+ "http://videos.jzvd.org/ldj/22-ldj.mp4",
+ "http://videos.jzvd.org/ldj/23-ldj.mp4",
+ "http://videos.jzvd.org/ldj/24-ldj.mp4",
+ "http://videos.jzvd.org/ldj/25-ldj.mp4",
+ "http://videos.jzvd.org/ldj/26-ldj.mp4",
+ "http://videos.jzvd.org/ldj/27-ldj.mp4",
+ "http://videos.jzvd.org/ldj/28-ldj.mp4",
+ "http://videos.jzvd.org/ldj/29-ldj.mp4",
+
+ "http://videos.jzvd.org/ldj/30-ldj.mp4",
+ "http://videos.jzvd.org/ldj/31-ldj.mp4",
+ "http://videos.jzvd.org/ldj/32-ldj.mp4",
+ "http://videos.jzvd.org/ldj/33-ldj.mp4",
+ "http://videos.jzvd.org/ldj/34-ldj.mp4",
+ "http://videos.jzvd.org/ldj/35-ldj.mp4",
+ "http://videos.jzvd.org/ldj/36-ldj.mp4",
+ "http://videos.jzvd.org/ldj/37-ldj.mp4",
+ "http://videos.jzvd.org/ldj/38-ldj.mp4",
+ "http://videos.jzvd.org/ldj/39-ldj.mp4",
+
+ "http://videos.jzvd.org/ldj/40-ldj.mp4",
+ "http://videos.jzvd.org/ldj/41-ldj.mp4",
+ "http://videos.jzvd.org/ldj/42-ldj.mp4",
+ "http://videos.jzvd.org/ldj/43-ldj.mp4",
+ "http://videos.jzvd.org/ldj/44-ldj.mp4",
+ "http://videos.jzvd.org/ldj/45-ldj.mp4",
};
public static String[][] videoPosters =
From 44c5de7727fd80217f4e473b4e757452c4b94147 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E6=99=97=E5=93=B2?=
Date: Tue, 8 Dec 2020 17:48:07 +0800
Subject: [PATCH 36/52] =?UTF-8?q?=E6=92=AD=E6=94=BE=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=E5=BF=AB=E9=80=9F=E7=82=B9=E5=87=BB=E5=87=A0=E6=AC=A1=E5=B0=B1?=
=?UTF-8?q?=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98=E3=80=82=20=E9=80=82?=
=?UTF-8?q?=E9=85=8D=E5=8E=9F=E7=94=9F=E6=92=AD=E6=94=BE=E5=99=A8=E3=80=82?=
=?UTF-8?q?=20=E6=92=AD=E6=94=BE=E7=BC=93=E5=AD=98=E3=80=82=20=E5=AE=9E?=
=?UTF-8?q?=E6=97=B6=E6=9B=B4=E6=96=B0=E9=9B=86=E6=95=B0=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E5=99=A8=EF=BC=88=E5=8E=9F=E6=9C=AC=E7=82=B9=E5=87=BB=E4=B8=8B?=
=?UTF-8?q?=E4=B8=80=E9=9B=86=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=AE=9E=E6=97=B6?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../demo/Tab_2_Custom/AGVideo/AGVideo.java | 8 ++++--
.../Tab_2_Custom/AGVideo/AGVideoActivity.java | 28 +++++++++----------
.../AGVideo/popup/VideoEpisodePopup.java | 9 +++---
3 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java
index c0ee7957..506b1b28 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java
@@ -163,6 +163,7 @@ public void onClick(View v) {
onStatePause();
} else if (state == STATE_PAUSE) {
mediaInterface.start();
+ onStatePlaying();
} else if (state == STATE_AUTO_COMPLETE) {
startVideo();
}
@@ -260,8 +261,11 @@ public void onClick(View v) {
//点击重播,取消下一集倒计时
dismissNextView();
cancelDismissNextViewTimer();
- resetProgressAndTime();
- mediaInterface.seekTo(0);
+
+ Jzvd.releaseAllVideos();
+ //resetProgressAndTime();
+ //mediaInterface.seekTo(0);
+ changeUrl(jzDataSource, 0);
}
break;
case R.id.next_set:
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
index 99823336..ab9d882e 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
@@ -6,21 +6,20 @@
import android.widget.TextView;
import android.widget.Toast;
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.AppCompatActivity;
-
import com.google.android.material.tabs.TabLayout;
import java.util.ArrayList;
import java.util.List;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import cn.jzvd.JZDataSource;
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
+import cn.jzvd.demo.ApplicationDemo;
+import cn.jzvd.demo.R;
import cn.jzvd.demo.Tab_2_Custom.AGVideo.popup.VideoEpisodePopup;
import cn.jzvd.demo.Tab_2_Custom.AGVideo.popup.VideoSpeedPopup;
-import cn.jzvd.demo.CustomMedia.JZMediaExo;
-import cn.jzvd.demo.R;
import cn.jzvd.demo.Urls;
import cn.jzvd.demo.utils.ScreenRotateUtils;
@@ -50,9 +49,9 @@ private void initView() {
mPlayer = findViewById(R.id.ag_player);
initEpisodesTablayout();
mPlayer.setJzVideoListener(this);
- mJzDataSource = new JZDataSource(episodeList.get(0).getVideoUrl(), episodeList.get(0).getVideoName());
- mPlayer.setUp(mJzDataSource
- , JzvdStd.SCREEN_NORMAL, JZMediaExo.class);
+ mJzDataSource = new JZDataSource(ApplicationDemo.getProxy(AGVideoActivity.this).getProxyUrl(episodeList.get(0).getVideoUrl()), episodeList.get(0).getVideoName());
+ //mPlayer.setUp(mJzDataSource, JzvdStd.SCREEN_NORMAL, JZMediaExo.class);
+ mPlayer.setUp(mJzDataSource, JzvdStd.SCREEN_NORMAL);
mPlayer.startVideo();
}
@@ -88,8 +87,11 @@ public void onTabSelected(TabLayout.Tab tab) {
//定义方法,判断是否选中
int tag = Integer.parseInt(tab.getText().toString());
AGEpsodeEntity entity = episodeList.get(tag - 1);
- mJzDataSource = new JZDataSource(entity.getVideoUrl(), entity.getVideoName());
+ mJzDataSource = new JZDataSource(ApplicationDemo.getProxy(AGVideoActivity.this).getProxyUrl(entity.getVideoUrl()), entity.getVideoName());
updateTabView(tab, true);
+
+ Jzvd.releaseAllVideos();
+
playChangeUrl();
isNext(tab.getPosition());
}
@@ -234,7 +236,7 @@ private void dismissSpeedPopAndEpisodePop() {
* @param speed
*/
private void changeSpeed(float speed) {
- Object[] object = {speed};
+ Object[] object = { speed };
mPlayer.mediaInterface.setSpeed(speed);
mJzDataSource.objects[0] = object;
Toast.makeText(this, "正在以" + speed + "X倍速播放", Toast.LENGTH_SHORT).show();
@@ -256,7 +258,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
public void nextClick() {
int position = episodes.getSelectedTabPosition() + 1;
AGEpsodeEntity entity = episodeList.get(position);
- mJzDataSource = new JZDataSource(entity.getVideoUrl(), entity.getVideoName());
+ mJzDataSource = new JZDataSource(ApplicationDemo.getProxy(AGVideoActivity.this).getProxyUrl(entity.getVideoUrl()), entity.getVideoName());
TabLayout.Tab tab = episodes.getTabAt(position);
if (tab != null) {
tab.select();
@@ -285,7 +287,7 @@ public void selectPartsClick() {
videoEpisodePopup = new VideoEpisodePopup(this, episodeList);
videoEpisodePopup.setEpisondeClickListener(this);
}
- videoEpisodePopup.setPlayNum(1);
+ videoEpisodePopup.setPlayNum(episodes.getSelectedTabPosition() + 1);
videoEpisodePopup.showAtLocation(getWindow().getDecorView(), Gravity.RIGHT, 0, 0);
}
@@ -318,6 +320,4 @@ private void initVideoData() {
episodeList.add(new AGEpsodeEntity(Urls.ssVideos[i], "三生三世枕上书 第" + (i + 1) + "集"));
}
}
-
-
}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/popup/VideoEpisodePopup.java b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/popup/VideoEpisodePopup.java
index aea9f533..162bec66 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/popup/VideoEpisodePopup.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/popup/VideoEpisodePopup.java
@@ -11,16 +11,15 @@
import android.widget.LinearLayout;
import android.widget.PopupWindow;
-import androidx.recyclerview.widget.GridLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
-
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
+import androidx.recyclerview.widget.GridLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import cn.jzvd.demo.R;
import cn.jzvd.demo.Tab_2_Custom.AGVideo.AGEpsodeEntity;
import cn.jzvd.demo.Tab_2_Custom.AGVideo.VideoEpisodeAdapter;
-import cn.jzvd.demo.R;
import cn.jzvd.demo.utils.DipAndPx;
public class VideoEpisodePopup extends PopupWindow {
@@ -130,6 +129,8 @@ public void setPlayNum(int playNum) {
this.playNum = playNum;
episodeList.get(this.playNum - 1).setPlay(true);
}
+
+ episodeRecycler.getAdapter().notifyDataSetChanged();
}
public void startDismissTimer() {
From 7f99dad46ee4ba74786ef72f458c60223a3f2661 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E6=99=97=E5=93=B2?=
Date: Tue, 8 Dec 2020 17:58:41 +0800
Subject: [PATCH 37/52] =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=87=8D=E6=92=AD?=
=?UTF-8?q?=E5=8D=A1=E6=AD=BB=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java
index 506b1b28..e3cc60a1 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java
@@ -262,7 +262,6 @@ public void onClick(View v) {
dismissNextView();
cancelDismissNextViewTimer();
- Jzvd.releaseAllVideos();
//resetProgressAndTime();
//mediaInterface.seekTo(0);
changeUrl(jzDataSource, 0);
@@ -456,6 +455,7 @@ public boolean onTouch(View v, MotionEvent event) {
public void changeUrl(JZDataSource jzDataSource, long seekToInAdvance) {
next_set.setVisibility(GONE);
showProgress();
+ Jzvd.releaseAllVideos();
super.changeUrl(jzDataSource, seekToInAdvance);
// //切换播放地址之后继续以1倍速播放
if (jzDataSource.objects == null) {
From 6e6bb16382dadc824af42e98102abe10a0503ddf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E6=99=97=E5=93=B2?=
Date: Wed, 9 Dec 2020 09:32:35 +0800
Subject: [PATCH 38/52] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java | 1 -
.../java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java | 2 --
2 files changed, 3 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java
index e3cc60a1..04dc8100 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideo.java
@@ -455,7 +455,6 @@ public boolean onTouch(View v, MotionEvent event) {
public void changeUrl(JZDataSource jzDataSource, long seekToInAdvance) {
next_set.setVisibility(GONE);
showProgress();
- Jzvd.releaseAllVideos();
super.changeUrl(jzDataSource, seekToInAdvance);
// //切换播放地址之后继续以1倍速播放
if (jzDataSource.objects == null) {
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
index ab9d882e..69a6ee93 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
@@ -90,8 +90,6 @@ public void onTabSelected(TabLayout.Tab tab) {
mJzDataSource = new JZDataSource(ApplicationDemo.getProxy(AGVideoActivity.this).getProxyUrl(entity.getVideoUrl()), entity.getVideoName());
updateTabView(tab, true);
- Jzvd.releaseAllVideos();
-
playChangeUrl();
isNext(tab.getPosition());
}
From 6f9c3dd9ea1ead88c00e0e825711f568a7b8d1fa Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Sun, 13 Dec 2020 23:15:18 +0800
Subject: [PATCH 39/52] kt urls
---
demo/src/main/java/cn/jzvd/demo/Urls.java | 248 ++++++++++----------
demo/src/main/java/org/jzvd/jzvideo/urls.kt | 64 +++++
2 files changed, 186 insertions(+), 126 deletions(-)
create mode 100644 demo/src/main/java/org/jzvd/jzvideo/urls.kt
diff --git a/demo/src/main/java/cn/jzvd/demo/Urls.java b/demo/src/main/java/cn/jzvd/demo/Urls.java
index 48bfb991..ed3226a6 100644
--- a/demo/src/main/java/cn/jzvd/demo/Urls.java
+++ b/demo/src/main/java/cn/jzvd/demo/Urls.java
@@ -4,74 +4,137 @@
* Created by shengjun on 16/9/10.
*/
public class Urls {
-
- public static String[] videoUrlList =
- {
- "http://jzvd.nathen.cn/c494b340ff704015bb6682ffde3cd302/64929c369124497593205a4190d7d128-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/63f3f73712544394be981d9e4f56b612/69c5767bb9e54156b5b60a1b6edeb3b5-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/b201be3093814908bf987320361c5a73/2f6d913ea25941ffa78cc53a59025383-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/d2438fd1c37c4618a704513ad38d68c5/68626a9d53ca421c896ac8010f172b68-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/25a8d119cfa94b49a7a4117257d8ebd7/f733e65a22394abeab963908f3c336db-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/7512edd1ad834d40bb5b978402274b1a/9691c7f2d7b74b5e811965350a0e5772-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
- };
-
public static String[] clarities = {
"https://jzvd.nathen.cn/video/460bad24-170c5bc6956-0007-1823-c86-de200.mp4",
"https://jzvd.nathen.cn/video/2b64c629-17204eaa4fa-0007-1823-c86-de200.mp4",
"https://jzvd.nathen.cn/video/a70a7fb-17204eaa501-0007-1823-c86-de200.mp4"
};
+ public static String[] videoUrlList = {
+ "http://jzvd.nathen.cn/c494b340ff704015bb6682ffde3cd302/64929c369124497593205a4190d7d128-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/63f3f73712544394be981d9e4f56b612/69c5767bb9e54156b5b60a1b6edeb3b5-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/b201be3093814908bf987320361c5a73/2f6d913ea25941ffa78cc53a59025383-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/d2438fd1c37c4618a704513ad38d68c5/68626a9d53ca421c896ac8010f172b68-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/25a8d119cfa94b49a7a4117257d8ebd7/f733e65a22394abeab963908f3c336db-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/7512edd1ad834d40bb5b978402274b1a/9691c7f2d7b74b5e811965350a0e5772-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
+ };
+
+
+ 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",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/a019ffc1-556c-4a85-b70c-b1b49811d577.jpg",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/6fc2ae91-36e2-44c5-bb10-29ae5d5c678c.png",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/f03cee95-9b78-4dd5-986f-d162c06c385c.png",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png",
+ ""
+ };
- public static String[] videoPosterList =
+ public static String[][] videoUrls = {
+ {
+ "http://jzvd.nathen.cn/6ea7357bc3fa4658b29b7933ba575008/fbbba953374248eb913cb1408dc61d85-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/35b3dc97fbc240219961bd1fccc6400b/8d9b76ab5a584bce84a8afce012b72d3-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/df6096e7878541cbbea3f7298683fbed/ef76450342914427beafe9368a4e0397-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/384d341e000145fb82295bdc54ecef88/103eab5afca34baebc970378dd484942-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/f55530ba8a59403da0621cbf4faef15e/adae4f2e3ecf4ea780beb057e7bce84c-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/6340efd1962946ad80eeffd19b3be89c/65b499c0f16e4dd8900497e51ffa0949-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/f07fa9fddd1e45a6ae1570c7fe7967c1/c6db82685b894e25b523b1cb28d79f2e-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/d2e969f2ec734520b46ab0965d2b68bd/f124edfef6c24be8b1a7b7f996ccc5e0-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/4f965ad507ef4194a60a943a34cfe147/32af151ea132471f92c9ced2cff785ea-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
+ },
+ {
+ "http://jzvd.nathen.cn/623f75c3beea4b1781ea37940e70bbe4/b9cee3fd1a09487ca99ef789cdc41312-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/d8c137ceba9849f8b2f454a55a96266f/910c8381ff894905b5bc272f8194382a-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/b8a589e5f12c45fdad96674d08affd31/f1d7229f553f414283033af3e292c6c9-5287d2089db37e62345123a1be272f8b.mp4",
+ "http://jzvd.nathen.cn/8abcdf98ec6a418b945a70fe9dd6fc7f/5cb36416a23a4da8b15d3eaa5e19a1e6-5287d2089db37e62345123a1be272f8b.mp4"
+ },
{
- "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",
- "http://jzvd-pic.nathen.cn/jzvd-pic/a019ffc1-556c-4a85-b70c-b1b49811d577.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/6fc2ae91-36e2-44c5-bb10-29ae5d5c678c.png",
- "http://jzvd-pic.nathen.cn/jzvd-pic/f03cee95-9b78-4dd5-986f-d162c06c385c.png",
- "http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png",
- ""
- };
+ "http://jzvd.nathen.cn/1b61da23555d4ce28c805ea303711aa5/7a33ac2af276441bb4b9838f32d8d710-5287d2089db37e62345123a1be272f8b.mp4",
+ "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[][] videoUrls =
+ public static String[][] videoPosters = {
+ {
+ "http://jzvd-pic.nathen.cn/jzvd-pic/bd7ffc84-8407-4037-a078-7d922ce0fb0f.jpg",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/f2dbd12e-b1cb-4daf-aff1-8c6be2f64d1a.jpg",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/ccd86ca1-66c7-4331-9450-a3b7f765424a.png",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/2adde364-9be1-4864-b4b9-0b0bcc81ef2e.jpg",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/2a877211-4b68-4e3a-87be-6d2730faef27.png",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/aaeb5da9-ac50-4712-a28d-863fe40f1fc6.png",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/e565f9cc-eedc-45f0-99f8-5b0fa3aed567%281%29.jpg",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/3430ec64-e6a7-4d8e-b044-9d408e075b7c.jpg",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/2204a578-609b-440e-8af7-a0ee17ff3aee.jpg",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png"
+ },
+ {
+ "http://jzvd-pic.nathen.cn/jzvd-pic/f18ee453-6aec-40a5-a046-3203111dd303.jpg",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/00f5a243-1e9f-426c-94f4-888971987edb.jpg",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/7df34ee9-1e4f-48f4-8acd-748c52368298.jpg",
+ "http://jzvd-pic.nathen.cn/jzvd-pic/ef46e139-e378-4298-8441-144888294f1f.png"
+ },
{
- {
- "http://jzvd.nathen.cn/6ea7357bc3fa4658b29b7933ba575008/fbbba953374248eb913cb1408dc61d85-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/35b3dc97fbc240219961bd1fccc6400b/8d9b76ab5a584bce84a8afce012b72d3-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/df6096e7878541cbbea3f7298683fbed/ef76450342914427beafe9368a4e0397-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/384d341e000145fb82295bdc54ecef88/103eab5afca34baebc970378dd484942-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/f55530ba8a59403da0621cbf4faef15e/adae4f2e3ecf4ea780beb057e7bce84c-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/6340efd1962946ad80eeffd19b3be89c/65b499c0f16e4dd8900497e51ffa0949-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/f07fa9fddd1e45a6ae1570c7fe7967c1/c6db82685b894e25b523b1cb28d79f2e-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/d2e969f2ec734520b46ab0965d2b68bd/f124edfef6c24be8b1a7b7f996ccc5e0-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/4f965ad507ef4194a60a943a34cfe147/32af151ea132471f92c9ced2cff785ea-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
- },
- {
- "http://jzvd.nathen.cn/623f75c3beea4b1781ea37940e70bbe4/b9cee3fd1a09487ca99ef789cdc41312-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/d8c137ceba9849f8b2f454a55a96266f/910c8381ff894905b5bc272f8194382a-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/b8a589e5f12c45fdad96674d08affd31/f1d7229f553f414283033af3e292c6c9-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/8abcdf98ec6a418b945a70fe9dd6fc7f/5cb36416a23a4da8b15d3eaa5e19a1e6-5287d2089db37e62345123a1be272f8b.mp4"
- },
- {
- "http://jzvd.nathen.cn/1b61da23555d4ce28c805ea303711aa5/7a33ac2af276441bb4b9838f32d8d710-5287d2089db37e62345123a1be272f8b.mp4",
- "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"
- }
- };
+ "http://jzvd-pic.nathen.cn/jzvd-pic/0e58101d-5b47-4100-8fb3-0cce057fd622.jpg",
+ "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"
+ }
+ };
+
+ public static String[][] videoTitles = {
+ {
+ "饺子出来",
+ "饺子溢出",
+ "饺子我姓王",
+ "饺子趴好了",
+ "饺子很渴",
+ "饺子这样不好",
+ "饺子别笑",
+ "饺子坐火车",
+ "饺子打游戏",
+ "饺子快长大"
+ },
+ {
+ "饺子堵车了",
+ "饺子喝点",
+ "饺子快走",
+ "饺子别这样"
+ },
+ {
+ "饺子想偷",
+ "饺子害羞了",
+ "饺子淡定",
+ "饺子好喜欢"
+ }
+ };
+
public static String[] ssVideos = {
"http://videos.jzvd.org/ldj/01-ldj.mp4",
@@ -125,71 +188,4 @@ public class Urls {
"http://videos.jzvd.org/ldj/45-ldj.mp4",
};
- public static String[][] videoPosters =
- {
- {
- "http://jzvd-pic.nathen.cn/jzvd-pic/bd7ffc84-8407-4037-a078-7d922ce0fb0f.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/f2dbd12e-b1cb-4daf-aff1-8c6be2f64d1a.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/ccd86ca1-66c7-4331-9450-a3b7f765424a.png",
- "http://jzvd-pic.nathen.cn/jzvd-pic/2adde364-9be1-4864-b4b9-0b0bcc81ef2e.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/2a877211-4b68-4e3a-87be-6d2730faef27.png",
- "http://jzvd-pic.nathen.cn/jzvd-pic/aaeb5da9-ac50-4712-a28d-863fe40f1fc6.png",
- "http://jzvd-pic.nathen.cn/jzvd-pic/e565f9cc-eedc-45f0-99f8-5b0fa3aed567%281%29.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/3430ec64-e6a7-4d8e-b044-9d408e075b7c.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/2204a578-609b-440e-8af7-a0ee17ff3aee.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png"
- },
- {
- "http://jzvd-pic.nathen.cn/jzvd-pic/f18ee453-6aec-40a5-a046-3203111dd303.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/00f5a243-1e9f-426c-94f4-888971987edb.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/7df34ee9-1e4f-48f4-8acd-748c52368298.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/ef46e139-e378-4298-8441-144888294f1f.png"
- },
- {
- "http://jzvd-pic.nathen.cn/jzvd-pic/0e58101d-5b47-4100-8fb3-0cce057fd622.jpg",
- "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"
- }
- };
-
- public static String[][] videoTitles =
- {
- {
- "饺子出来",
- "饺子溢出",
- "饺子我姓王",
- "饺子趴好了",
- "饺子很渴",
- "饺子这样不好",
- "饺子别笑",
- "饺子坐火车",
- "饺子打游戏",
- "饺子快长大"
- },
- {
- "饺子堵车了",
- "饺子喝点",
- "饺子快走",
- "饺子别这样"
- },
- {
- "饺子想偷",
- "饺子害羞了",
- "饺子淡定",
- "饺子好喜欢"
- }
- };
}
diff --git a/demo/src/main/java/org/jzvd/jzvideo/urls.kt b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
new file mode 100644
index 00000000..cc0e799a
--- /dev/null
+++ b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
@@ -0,0 +1,64 @@
+package org.jzvd.jzvideo
+
+
+val ldjVideos = arrayOf(
+ "http://videos.jzvd.org/ldj/01-ldj.mp4",
+ "http://videos.jzvd.org/ldj/02-ldj.mp4",
+ "http://videos.jzvd.org/ldj/03-ldj.mp4",
+ "http://videos.jzvd.org/ldj/04-ldj.mp4",
+ "http://videos.jzvd.org/ldj/05-ldj.mp4",
+ "http://videos.jzvd.org/ldj/06-ldj.mp4",
+ "http://videos.jzvd.org/ldj/07-ldj.mp4",
+ "http://videos.jzvd.org/ldj/08-ldj.mp4",
+ "http://videos.jzvd.org/ldj/09-ldj.mp4",
+ "http://videos.jzvd.org/ldj/10-ldj.mp4",
+ "http://videos.jzvd.org/ldj/11-ldj.mp4",
+ "http://videos.jzvd.org/ldj/12-ldj.mp4",
+ "http://videos.jzvd.org/ldj/13-ldj.mp4",
+ "http://videos.jzvd.org/ldj/14-ldj.mp4",
+ "http://videos.jzvd.org/ldj/15-ldj.mp4",
+ "http://videos.jzvd.org/ldj/16-ldj.mp4",
+ "http://videos.jzvd.org/ldj/17-ldj.mp4",
+ "http://videos.jzvd.org/ldj/18-ldj.mp4",
+ "http://videos.jzvd.org/ldj/19-ldj.mp4",
+ "http://videos.jzvd.org/ldj/20-ldj.mp4",
+ "http://videos.jzvd.org/ldj/21-ldj.mp4",
+ "http://videos.jzvd.org/ldj/22-ldj.mp4",
+ "http://videos.jzvd.org/ldj/23-ldj.mp4",
+ "http://videos.jzvd.org/ldj/24-ldj.mp4",
+ "http://videos.jzvd.org/ldj/25-ldj.mp4",
+ "http://videos.jzvd.org/ldj/26-ldj.mp4",
+ "http://videos.jzvd.org/ldj/27-ldj.mp4",
+ "http://videos.jzvd.org/ldj/28-ldj.mp4",
+ "http://videos.jzvd.org/ldj/29-ldj.mp4",
+ "http://videos.jzvd.org/ldj/30-ldj.mp4",
+ "http://videos.jzvd.org/ldj/31-ldj.mp4",
+ "http://videos.jzvd.org/ldj/32-ldj.mp4",
+ "http://videos.jzvd.org/ldj/33-ldj.mp4",
+ "http://videos.jzvd.org/ldj/34-ldj.mp4",
+ "http://videos.jzvd.org/ldj/35-ldj.mp4",
+ "http://videos.jzvd.org/ldj/36-ldj.mp4",
+ "http://videos.jzvd.org/ldj/37-ldj.mp4",
+ "http://videos.jzvd.org/ldj/38-ldj.mp4",
+ "http://videos.jzvd.org/ldj/39-ldj.mp4",
+ "http://videos.jzvd.org/ldj/40-ldj.mp4",
+ "http://videos.jzvd.org/ldj/41-ldj.mp4",
+ "http://videos.jzvd.org/ldj/42-ldj.mp4",
+ "http://videos.jzvd.org/ldj/43-ldj.mp4",
+ "http://videos.jzvd.org/ldj/44-ldj.mp4",
+ "http://videos.jzvd.org/ldj/45-ldj.mp4"
+)
+
+val videos = arrayOf(
+ "",
+ ""
+)
+
+val thumbnails = arrayOf(
+ "",
+ ""
+)
+
+val someUrls = ldjVideos.copyOfRange(3, 9)
+
+
From c34fe2bcfa9f5de139c3bd3e9b76729284097ec8 Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Thu, 17 Dec 2020 05:39:09 +0800
Subject: [PATCH 40/52] urls
---
demo/src/main/java/cn/jzvd/demo/Urls.java | 156 --------------------
demo/src/main/java/org/jzvd/jzvideo/urls.kt | 94 +++++++++++-
2 files changed, 89 insertions(+), 161 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Urls.java b/demo/src/main/java/cn/jzvd/demo/Urls.java
index ed3226a6..dfbfedfd 100644
--- a/demo/src/main/java/cn/jzvd/demo/Urls.java
+++ b/demo/src/main/java/cn/jzvd/demo/Urls.java
@@ -28,164 +28,8 @@ public class Urls {
"http://jzvd-pic.nathen.cn/jzvd-pic/f03cee95-9b78-4dd5-986f-d162c06c385c.png",
"http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png",
""
- };
-
- public static String[][] videoUrls = {
- {
- "http://jzvd.nathen.cn/6ea7357bc3fa4658b29b7933ba575008/fbbba953374248eb913cb1408dc61d85-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/35b3dc97fbc240219961bd1fccc6400b/8d9b76ab5a584bce84a8afce012b72d3-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/df6096e7878541cbbea3f7298683fbed/ef76450342914427beafe9368a4e0397-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/384d341e000145fb82295bdc54ecef88/103eab5afca34baebc970378dd484942-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/f55530ba8a59403da0621cbf4faef15e/adae4f2e3ecf4ea780beb057e7bce84c-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/6340efd1962946ad80eeffd19b3be89c/65b499c0f16e4dd8900497e51ffa0949-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/f07fa9fddd1e45a6ae1570c7fe7967c1/c6db82685b894e25b523b1cb28d79f2e-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/d2e969f2ec734520b46ab0965d2b68bd/f124edfef6c24be8b1a7b7f996ccc5e0-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/4f965ad507ef4194a60a943a34cfe147/32af151ea132471f92c9ced2cff785ea-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
- },
- {
- "http://jzvd.nathen.cn/623f75c3beea4b1781ea37940e70bbe4/b9cee3fd1a09487ca99ef789cdc41312-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/d8c137ceba9849f8b2f454a55a96266f/910c8381ff894905b5bc272f8194382a-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/b8a589e5f12c45fdad96674d08affd31/f1d7229f553f414283033af3e292c6c9-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/8abcdf98ec6a418b945a70fe9dd6fc7f/5cb36416a23a4da8b15d3eaa5e19a1e6-5287d2089db37e62345123a1be272f8b.mp4"
- },
- {
- "http://jzvd.nathen.cn/1b61da23555d4ce28c805ea303711aa5/7a33ac2af276441bb4b9838f32d8d710-5287d2089db37e62345123a1be272f8b.mp4",
- "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[][] videoPosters = {
- {
- "http://jzvd-pic.nathen.cn/jzvd-pic/bd7ffc84-8407-4037-a078-7d922ce0fb0f.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/f2dbd12e-b1cb-4daf-aff1-8c6be2f64d1a.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/ccd86ca1-66c7-4331-9450-a3b7f765424a.png",
- "http://jzvd-pic.nathen.cn/jzvd-pic/2adde364-9be1-4864-b4b9-0b0bcc81ef2e.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/2a877211-4b68-4e3a-87be-6d2730faef27.png",
- "http://jzvd-pic.nathen.cn/jzvd-pic/aaeb5da9-ac50-4712-a28d-863fe40f1fc6.png",
- "http://jzvd-pic.nathen.cn/jzvd-pic/e565f9cc-eedc-45f0-99f8-5b0fa3aed567%281%29.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/3430ec64-e6a7-4d8e-b044-9d408e075b7c.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/2204a578-609b-440e-8af7-a0ee17ff3aee.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png"
- },
- {
- "http://jzvd-pic.nathen.cn/jzvd-pic/f18ee453-6aec-40a5-a046-3203111dd303.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/00f5a243-1e9f-426c-94f4-888971987edb.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/7df34ee9-1e4f-48f4-8acd-748c52368298.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/ef46e139-e378-4298-8441-144888294f1f.png"
- },
- {
- "http://jzvd-pic.nathen.cn/jzvd-pic/0e58101d-5b47-4100-8fb3-0cce057fd622.jpg",
- "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"
- }
};
- public static String[][] videoTitles = {
- {
- "饺子出来",
- "饺子溢出",
- "饺子我姓王",
- "饺子趴好了",
- "饺子很渴",
- "饺子这样不好",
- "饺子别笑",
- "饺子坐火车",
- "饺子打游戏",
- "饺子快长大"
- },
- {
- "饺子堵车了",
- "饺子喝点",
- "饺子快走",
- "饺子别这样"
- },
- {
- "饺子想偷",
- "饺子害羞了",
- "饺子淡定",
- "饺子好喜欢"
- }
- };
-
-
- public static String[] ssVideos = {
- "http://videos.jzvd.org/ldj/01-ldj.mp4",
- "http://videos.jzvd.org/ldj/02-ldj.mp4",
- "http://videos.jzvd.org/ldj/03-ldj.mp4",
- "http://videos.jzvd.org/ldj/04-ldj.mp4",
- "http://videos.jzvd.org/ldj/05-ldj.mp4",
- "http://videos.jzvd.org/ldj/06-ldj.mp4",
- "http://videos.jzvd.org/ldj/07-ldj.mp4",
- "http://videos.jzvd.org/ldj/08-ldj.mp4",
- "http://videos.jzvd.org/ldj/09-ldj.mp4",
-
- "http://videos.jzvd.org/ldj/10-ldj.mp4",
- "http://videos.jzvd.org/ldj/11-ldj.mp4",
- "http://videos.jzvd.org/ldj/12-ldj.mp4",
- "http://videos.jzvd.org/ldj/13-ldj.mp4",
- "http://videos.jzvd.org/ldj/14-ldj.mp4",
- "http://videos.jzvd.org/ldj/15-ldj.mp4",
- "http://videos.jzvd.org/ldj/16-ldj.mp4",
- "http://videos.jzvd.org/ldj/17-ldj.mp4",
- "http://videos.jzvd.org/ldj/18-ldj.mp4",
- "http://videos.jzvd.org/ldj/19-ldj.mp4",
-
- "http://videos.jzvd.org/ldj/20-ldj.mp4",
- "http://videos.jzvd.org/ldj/21-ldj.mp4",
- "http://videos.jzvd.org/ldj/22-ldj.mp4",
- "http://videos.jzvd.org/ldj/23-ldj.mp4",
- "http://videos.jzvd.org/ldj/24-ldj.mp4",
- "http://videos.jzvd.org/ldj/25-ldj.mp4",
- "http://videos.jzvd.org/ldj/26-ldj.mp4",
- "http://videos.jzvd.org/ldj/27-ldj.mp4",
- "http://videos.jzvd.org/ldj/28-ldj.mp4",
- "http://videos.jzvd.org/ldj/29-ldj.mp4",
-
- "http://videos.jzvd.org/ldj/30-ldj.mp4",
- "http://videos.jzvd.org/ldj/31-ldj.mp4",
- "http://videos.jzvd.org/ldj/32-ldj.mp4",
- "http://videos.jzvd.org/ldj/33-ldj.mp4",
- "http://videos.jzvd.org/ldj/34-ldj.mp4",
- "http://videos.jzvd.org/ldj/35-ldj.mp4",
- "http://videos.jzvd.org/ldj/36-ldj.mp4",
- "http://videos.jzvd.org/ldj/37-ldj.mp4",
- "http://videos.jzvd.org/ldj/38-ldj.mp4",
- "http://videos.jzvd.org/ldj/39-ldj.mp4",
-
- "http://videos.jzvd.org/ldj/40-ldj.mp4",
- "http://videos.jzvd.org/ldj/41-ldj.mp4",
- "http://videos.jzvd.org/ldj/42-ldj.mp4",
- "http://videos.jzvd.org/ldj/43-ldj.mp4",
- "http://videos.jzvd.org/ldj/44-ldj.mp4",
- "http://videos.jzvd.org/ldj/45-ldj.mp4",
- };
}
diff --git a/demo/src/main/java/org/jzvd/jzvideo/urls.kt b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
index cc0e799a..0be80a6a 100644
--- a/demo/src/main/java/org/jzvd/jzvideo/urls.kt
+++ b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
@@ -50,15 +50,99 @@ val ldjVideos = arrayOf(
)
val videos = arrayOf(
- "",
- ""
+ "http://videos.jzvd.org/v/饺子还年轻.mp4",
+ "http://videos.jzvd.org/v/饺子主动.mp4",
+ "http://videos.jzvd.org/v/饺子真萌.mp4",
+ "http://videos.jzvd.org/v/饺子真会.mp4",
+ "http://videos.jzvd.org/v/饺子运动.mp4",
+ "http://videos.jzvd.org/v/饺子有活.mp4",
+ "http://videos.jzvd.org/v/饺子星光.mp4",
+ "http://videos.jzvd.org/v/饺子想听.mp4",
+ "http://videos.jzvd.org/v/饺子想吹.mp4",
+ "http://videos.jzvd.org/v/饺子汪汪.mp4",
+ "http://videos.jzvd.org/v/饺子偷人.mp4",
+ "http://videos.jzvd.org/v/饺子挺住.mp4",
+ "http://videos.jzvd.org/v/饺子跳.mp4",
+ "http://videos.jzvd.org/v/饺子受不了.mp4",
+ "http://videos.jzvd.org/v/饺子三位.mp4",
+ "http://videos.jzvd.org/v/饺子起飞.mp4",
+ "http://videos.jzvd.org/v/饺子你听.mp4",
+ "http://videos.jzvd.org/v/饺子可以了.mp4",
+ "http://videos.jzvd.org/v/饺子可以.mp4",
+ "http://videos.jzvd.org/v/饺子好妈妈.mp4",
+ "http://videos.jzvd.org/v/饺子还小.mp4",
+ "http://videos.jzvd.org/v/饺子高兴.mp4",
+ "http://videos.jzvd.org/v/饺子高冷.mp4",
+ "http://videos.jzvd.org/v/饺子堵住了.mp4",
+ "http://videos.jzvd.org/v/饺子都懂.mp4",
+ "http://videos.jzvd.org/v/饺子打电话.mp4",
+ "http://videos.jzvd.org/v/饺子不服.mp4"
)
val thumbnails = arrayOf(
- "",
- ""
+ "http://videos.jzvd.org/v/饺子还年轻.jpg",
+ "http://videos.jzvd.org/v/饺子主动.jpg",
+ "http://videos.jzvd.org/v/饺子真萌.jpg",
+ "http://videos.jzvd.org/v/饺子真会.jpg",
+ "http://videos.jzvd.org/v/饺子运动.jpg",
+ "http://videos.jzvd.org/v/饺子有活.jpg",
+ "http://videos.jzvd.org/v/饺子星光.jpg",
+ "http://videos.jzvd.org/v/饺子想听.jpg",
+ "http://videos.jzvd.org/v/饺子想吹.jpg",
+ "http://videos.jzvd.org/v/饺子汪汪.jpg",
+ "http://videos.jzvd.org/v/饺子偷人.jpg",
+ "http://videos.jzvd.org/v/饺子挺住.jpg",
+ "http://videos.jzvd.org/v/饺子跳.jpg",
+ "http://videos.jzvd.org/v/饺子受不了.jpg",
+ "http://videos.jzvd.org/v/饺子三位.jpg",
+ "http://videos.jzvd.org/v/饺子起飞.jpg",
+ "http://videos.jzvd.org/v/饺子你听.jpg",
+ "http://videos.jzvd.org/v/饺子可以了.jpg",
+ "http://videos.jzvd.org/v/饺子可以.jpg",
+ "http://videos.jzvd.org/v/饺子好妈妈.jpg",
+ "http://videos.jzvd.org/v/饺子还小.jpg",
+ "http://videos.jzvd.org/v/饺子高兴.jpg",
+ "http://videos.jzvd.org/v/饺子高冷.jpg",
+ "http://videos.jzvd.org/v/饺子堵住了.jpg",
+ "http://videos.jzvd.org/v/饺子都懂.jpg",
+ "http://videos.jzvd.org/v/饺子打电话.jpg",
+ "http://videos.jzvd.org/v/饺子不服.jpg"
)
-val someUrls = ldjVideos.copyOfRange(3, 9)
+val titles = arrayOf(
+ "饺子还年轻",
+ "饺子主动",
+ "饺子真萌",
+ "饺子真会",
+ "饺子运动",
+ "饺子有活",
+ "饺子星光",
+ "饺子想听",
+ "饺子想吹",
+ "饺子汪汪",
+ "饺子偷人",
+ "饺子挺住",
+ "饺子跳",
+ "饺子受不了",
+ "饺子三位",
+ "饺子起飞",
+ "饺子你听",
+ "饺子可以了",
+ "饺子可以",
+ "饺子好妈妈",
+ "饺子还小",
+ "饺子高兴",
+ "饺子高冷",
+ "饺子堵住了",
+ "饺子都懂",
+ "饺子打电话",
+ "饺子不服"
+)
+
+val list1 = videos.copyOfRange(3, 9)
+val list2 = videos.copyOfRange(1, 6)
+val list3 = videos.copyOfRange(0, 3)
+
+
From 012f602460737abb55f963b34d974e6ee8754082 Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Fri, 18 Dec 2020 01:41:07 +0800
Subject: [PATCH 41/52] all urls
---
demo/src/main/java/org/jzvd/jzvideo/urls.kt | 90 ++++++++++-----------
1 file changed, 45 insertions(+), 45 deletions(-)
diff --git a/demo/src/main/java/org/jzvd/jzvideo/urls.kt b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
index 0be80a6a..ee5d4aea 100644
--- a/demo/src/main/java/org/jzvd/jzvideo/urls.kt
+++ b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
@@ -2,51 +2,51 @@ package org.jzvd.jzvideo
val ldjVideos = arrayOf(
- "http://videos.jzvd.org/ldj/01-ldj.mp4",
- "http://videos.jzvd.org/ldj/02-ldj.mp4",
- "http://videos.jzvd.org/ldj/03-ldj.mp4",
- "http://videos.jzvd.org/ldj/04-ldj.mp4",
- "http://videos.jzvd.org/ldj/05-ldj.mp4",
- "http://videos.jzvd.org/ldj/06-ldj.mp4",
- "http://videos.jzvd.org/ldj/07-ldj.mp4",
- "http://videos.jzvd.org/ldj/08-ldj.mp4",
- "http://videos.jzvd.org/ldj/09-ldj.mp4",
- "http://videos.jzvd.org/ldj/10-ldj.mp4",
- "http://videos.jzvd.org/ldj/11-ldj.mp4",
- "http://videos.jzvd.org/ldj/12-ldj.mp4",
- "http://videos.jzvd.org/ldj/13-ldj.mp4",
- "http://videos.jzvd.org/ldj/14-ldj.mp4",
- "http://videos.jzvd.org/ldj/15-ldj.mp4",
- "http://videos.jzvd.org/ldj/16-ldj.mp4",
- "http://videos.jzvd.org/ldj/17-ldj.mp4",
- "http://videos.jzvd.org/ldj/18-ldj.mp4",
- "http://videos.jzvd.org/ldj/19-ldj.mp4",
- "http://videos.jzvd.org/ldj/20-ldj.mp4",
- "http://videos.jzvd.org/ldj/21-ldj.mp4",
- "http://videos.jzvd.org/ldj/22-ldj.mp4",
- "http://videos.jzvd.org/ldj/23-ldj.mp4",
- "http://videos.jzvd.org/ldj/24-ldj.mp4",
- "http://videos.jzvd.org/ldj/25-ldj.mp4",
- "http://videos.jzvd.org/ldj/26-ldj.mp4",
- "http://videos.jzvd.org/ldj/27-ldj.mp4",
- "http://videos.jzvd.org/ldj/28-ldj.mp4",
- "http://videos.jzvd.org/ldj/29-ldj.mp4",
- "http://videos.jzvd.org/ldj/30-ldj.mp4",
- "http://videos.jzvd.org/ldj/31-ldj.mp4",
- "http://videos.jzvd.org/ldj/32-ldj.mp4",
- "http://videos.jzvd.org/ldj/33-ldj.mp4",
- "http://videos.jzvd.org/ldj/34-ldj.mp4",
- "http://videos.jzvd.org/ldj/35-ldj.mp4",
- "http://videos.jzvd.org/ldj/36-ldj.mp4",
- "http://videos.jzvd.org/ldj/37-ldj.mp4",
- "http://videos.jzvd.org/ldj/38-ldj.mp4",
- "http://videos.jzvd.org/ldj/39-ldj.mp4",
- "http://videos.jzvd.org/ldj/40-ldj.mp4",
- "http://videos.jzvd.org/ldj/41-ldj.mp4",
- "http://videos.jzvd.org/ldj/42-ldj.mp4",
- "http://videos.jzvd.org/ldj/43-ldj.mp4",
- "http://videos.jzvd.org/ldj/44-ldj.mp4",
- "http://videos.jzvd.org/ldj/45-ldj.mp4"
+ "http://videos.jzvd.org/v/ldj/01-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/02-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/03-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/04-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/05-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/06-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/07-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/08-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/09-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/10-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/11-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/12-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/13-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/14-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/15-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/16-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/17-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/18-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/19-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/20-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/21-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/22-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/23-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/24-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/25-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/26-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/27-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/28-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/29-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/30-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/31-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/32-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/33-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/34-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/35-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/36-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/37-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/38-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/39-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/40-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/41-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/42-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/43-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/44-ldj.mp4",
+ "http://videos.jzvd.org/v/ldj/45-ldj.mp4"
)
val videos = arrayOf(
From d152763c824e553d2e9b77d29500d3ac71682fc9 Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Sat, 19 Dec 2020 02:17:10 +0800
Subject: [PATCH 42/52] all videos
---
build.gradle | 2 +-
demo/build.gradle | 3 +-
.../java/cn/jzvd/demo/Fragment_1_Base.java | 6 +-
.../java/cn/jzvd/demo/Fragment_2_Custom.java | 85 +++++++------------
.../demo/Tab_1_Basic/CustomMediaActivity.java | 22 ++---
.../demo/Tab_1_Basic/OrientationActivity.java | 7 +-
.../demo/Tab_1_Basic/PreloadingActivity.java | 17 ++--
.../RotationVideoSizeActivity.java | 7 +-
.../Tab_1_Basic/ScreenRotateActivity.java | 7 +-
.../Tab_2_Custom/AGVideo/AGVideoActivity.java | 7 +-
.../jzvd/demo/Tab_3_List/GetGifActivity.java | 13 +--
.../Tab_3_List/ListView/FragmentDemo.java | 9 +-
.../ListView/ListViewMultiHolderActivity.java | 9 +-
.../ListView/NormalListViewActivity.java | 9 +-
.../ListView/RecyclerViewActivity.java | 22 +++--
.../ListView/adapter/CommentAdapter.java | 12 ++-
.../ListView/adapter/RecyclerViewAdapter.java | 13 +--
.../adapter/RecyclerViewLoadMoreAdapter.java | 3 +-
.../adapter/RecyclerViewTinyAdapter.java | 9 +-
.../adapter/SmoothRecyclerViewAdapter.java | 10 ++-
.../tiktok/TikTokRecyclerViewAdapter.java | 9 +-
...yWindowRecycleViewMultiHolderActivity.java | 9 +-
.../jzvd/demo/Tab_4_More/DanmuActivity.java | 21 +----
.../demo/Tab_4_More/DirectPlayActivity.java | 5 +-
.../jzvd/demo/Tab_4_More/WebViewActivity.java | 19 ++---
demo/src/main/java/cn/jzvd/demo/Urls.java | 35 --------
.../entity => utils}/VideoEntity.java | 2 +-
demo/src/main/java/org/jzvd/jzvideo/urls.kt | 28 +++++-
library/build.gradle | 2 +-
29 files changed, 183 insertions(+), 219 deletions(-)
delete mode 100644 demo/src/main/java/cn/jzvd/demo/Urls.java
rename demo/src/main/java/cn/jzvd/demo/{Tab_3_List/ListView/entity => utils}/VideoEntity.java (91%)
diff --git a/build.gradle b/build.gradle
index 15142398..c991cbcc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = '1.4.20'
+ ext.kotlin_version = '1.4.21'
repositories {
jcenter()
google()
diff --git a/demo/build.gradle b/demo/build.gradle
index d174a4c9..ac021865 100644
--- a/demo/build.gradle
+++ b/demo/build.gradle
@@ -1,8 +1,9 @@
apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
android {
compileSdkVersion 30
- buildToolsVersion "30.0.2"
+ buildToolsVersion "30.0.3"
defaultConfig {
applicationId "cn.jzvd.demo"
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
index 6556c5a8..e849af14 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
@@ -14,6 +14,8 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import java.util.LinkedHashMap;
import cn.jzvd.JZDataSource;
@@ -68,7 +70,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
LinkedHashMap map = new LinkedHashMap();
- String proxyUrl = ApplicationDemo.getProxy(getContext()).getProxyUrl(Urls.clarities[0]);
+ String proxyUrl = ApplicationDemo.getProxy(getContext()).getProxyUrl("http://videos.jzvd.org/ldj/01-ldj.mp4");
map.put("高清", proxyUrl);
map.put("标清", "http://videos.jzvd.org/ldj/01-ldj.mp4");
map.put("普清", "http://videos.jzvd.org/ldj/04-ldj.mp4");
@@ -79,7 +81,7 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
mJzvdStd.setUp(jzDataSource
, JzvdStd.SCREEN_NORMAL);
Jzvd.PROGRESS_DRAG_RATE = 2f;//设置播放进度条手势滑动阻尼系数
- Glide.with(this).load(Urls.videoPosterList[0]).into(mJzvdStd.posterImageView);
+ Glide.with(this).load(UrlsKt.getThumbnails()[0]).into(mJzvdStd.posterImageView);
}
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java b/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
index 24a1adb2..17624e1c 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_2_Custom.java
@@ -12,6 +12,8 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.CustomJzvd.JzvdStdAutoOrizental;
@@ -78,83 +80,56 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
- jzvdStdAutoOrizental.setUp("http://jzvd.nathen.cn/384d341e000145fb82295bdc54ecef88/103eab5afca34baebc970378dd484942-5287d2089db37e62345123a1be272f8b.mp4"
- , "饺子大小任意");
- Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(jzvdStdAutoOrizental.posterImageView);
+ jzvdStdAutoOrizental.setUp(UrlsKt.getVideos()[0], UrlsKt.getTitles()[0]);
+ Glide.with(this).load(UrlsKt.getThumbnails()[0]).into(jzvdStdAutoOrizental.posterImageView);
- jzvdStdRound.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
- , "饺子圆角");
- Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(jzvdStdRound.posterImageView);
+ jzvdStdRound.setUp(UrlsKt.getVideos()[1], UrlsKt.getTitles()[1]);
+ Glide.with(this).load(UrlsKt.getThumbnails()[1]).into(jzvdStdRound.posterImageView);
- jzNoTitle.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
- , "饺子叫啥也显示不出来啊");
- Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(jzNoTitle.posterImageView);
+ jzNoTitle.setUp(UrlsKt.getVideos()[2], UrlsKt.getTitles()[2]);
+ Glide.with(this).load(UrlsKt.getThumbnails()[2]).into(jzNoTitle.posterImageView);
- lockScreen.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
- , "饺子定身");
- Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(lockScreen.posterImageView);
+ lockScreen.setUp(UrlsKt.getVideos()[3], UrlsKt.getTitles()[3]);
+ Glide.with(this).load(UrlsKt.getThumbnails()[3]).into(lockScreen.posterImageView);
- jzvdStdWithShareButton.setUp(Urls.videoUrlList[3], "饺子想呼吸", Jzvd.SCREEN_NORMAL);
- Glide.with(this)
- .load(Urls.videoPosterList[3])
- .into(jzvdStdWithShareButton.posterImageView);
+ jzvdStdWithShareButton.setUp(UrlsKt.getVideos()[4], UrlsKt.getTitles()[4], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[4]).into(jzvdStdWithShareButton.posterImageView);
- jzvdStdShowTitleAfterFullscreen.setUp(Urls.videoUrlList[4], "饺子想摇头", Jzvd.SCREEN_NORMAL);
- Glide.with(this)
- .load(Urls.videoPosterList[4])
- .into(jzvdStdShowTitleAfterFullscreen.posterImageView);
+ jzvdStdShowTitleAfterFullscreen.setUp(UrlsKt.getVideos()[5], UrlsKt.getTitles()[5], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[5]).into(jzvdStdShowTitleAfterFullscreen.posterImageView);
- jzvdStdShowTextureViewAfterAutoComplete.setUp(Urls.videoUrlList[5], "饺子想旅行", Jzvd.SCREEN_NORMAL);
- Glide.with(this)
- .load(Urls.videoPosterList[5])
- .into(jzvdStdShowTextureViewAfterAutoComplete.posterImageView);
+ jzvdStdShowTextureViewAfterAutoComplete.setUp(UrlsKt.getVideos()[6], UrlsKt.getTitles()[6], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[6]).into(jzvdStdShowTextureViewAfterAutoComplete.posterImageView);
- jzvdStdAutoCompleteAfterFullscreen.setUp(Urls.videoUrls[0][1], "饺子没来", Jzvd.SCREEN_NORMAL);
- Glide.with(this)
- .load(Urls.videoPosters[0][1])
- .into(jzvdStdAutoCompleteAfterFullscreen.posterImageView);
+ jzvdStdAutoCompleteAfterFullscreen.setUp(UrlsKt.getVideos()[7], UrlsKt.getTitles()[7], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[7]).into(jzvdStdAutoCompleteAfterFullscreen.posterImageView);
- jzvdStd_1_1.setUp(Urls.videoUrls[0][1], "饺子有事吗", Jzvd.SCREEN_NORMAL);
- Glide.with(this)
- .load(Urls.videoPosters[0][1])
- .into(jzvdStd_1_1.posterImageView);
+ jzvdStd_1_1.setUp(UrlsKt.getVideos()[8], UrlsKt.getTitles()[8], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[8]).into(jzvdStd_1_1.posterImageView);
jzvdStd_1_1.widthRatio = 1;
jzvdStd_1_1.heightRatio = 1;
- jzvdStd_16_9.setUp(Urls.videoUrls[0][1], "饺子来不了", Jzvd.SCREEN_NORMAL);
- Glide.with(this)
- .load(Urls.videoPosters[0][1])
- .into(jzvdStd_16_9.posterImageView);
+ jzvdStd_16_9.setUp(UrlsKt.getVideos()[9], UrlsKt.getTitles()[9], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[9]).into(jzvdStd_16_9.posterImageView);
jzvdStd_16_9.widthRatio = 16;
jzvdStd_16_9.heightRatio = 9;
- jzvdStdVolumeAfterFullscreen.setUp(Urls.videoUrls[0][1], "饺子摇摆", Jzvd.SCREEN_NORMAL);
- Glide.with(this)
- .load(Urls.videoPosters[0][1])
- .into(jzvdStdVolumeAfterFullscreen.posterImageView);
+ jzvdStdVolumeAfterFullscreen.setUp(UrlsKt.getVideos()[10], UrlsKt.getTitles()[10], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[10]).into(jzvdStdVolumeAfterFullscreen.posterImageView);
- jzvdStdMp3.setUp(Urls.videoUrls[0][1],
- "饺子你听", Jzvd.SCREEN_NORMAL);
- Glide.with(this)
- .load(Urls.videoPosters[0][1])
- .into(jzvdStdMp3.posterImageView);
+ jzvdStdMp3.setUp(UrlsKt.getVideos()[11], UrlsKt.getTitles()[11], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[11]).into(jzvdStdMp3.posterImageView);
- jzvdStdSpeed.setUp(Urls.videoUrls[0][1],
- "饺子快点", Jzvd.SCREEN_NORMAL);
- Glide.with(this)
- .load(Urls.videoPosters[0][1])
- .into(jzvdStdSpeed.posterImageView);
+ jzvdStdSpeed.setUp(UrlsKt.getVideos()[12], UrlsKt.getTitles()[12], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[12]).into(jzvdStdSpeed.posterImageView);
- jzvdStdVolume.setUp(Urls.videoUrls[0][1],
- "饺子吃莽莽", Jzvd.SCREEN_NORMAL);
- Glide.with(this)
- .load(Urls.videoPosters[0][1])
- .into(jzvdStdVolume.posterImageView);
+ jzvdStdVolume.setUp(UrlsKt.getVideos()[13], UrlsKt.getTitles()[13], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[13]).into(jzvdStdVolume.posterImageView);
}
@Override
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java
index 77b148a7..7777dc74 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/CustomMediaActivity.java
@@ -10,6 +10,8 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.JZMediaSystem;
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
@@ -37,11 +39,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
jzvdStd = findViewById(R.id.videoplayer);
- jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
- , "饺子很保守", JzvdStd.SCREEN_NORMAL);
+ jzvdStd.setUp(UrlsKt.getVideos()[9]
+ , UrlsKt.getTitles()[9], JzvdStd.SCREEN_NORMAL);
Glide.with(this)
- .load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png")
+ .load(UrlsKt.getThumbnails()[9])
.into(jzvdStd.posterImageView);
}
@@ -49,32 +51,30 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
public void clickChangeToIjkplayer(View view) {
Jzvd.releaseAllVideos();
- jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
- , "饺子变心", JzvdStd.SCREEN_NORMAL, JZMediaIjk.class);
+ jzvdStd.setUp(UrlsKt.getVideos()[1]
+ , UrlsKt.getTitles()[1], JzvdStd.SCREEN_NORMAL, JZMediaIjk.class);
jzvdStd.startVideo();
Toast.makeText(this, "Change to Ijkplayer", Toast.LENGTH_SHORT).show();
}
public void clickChangeToSystem(View view) {
Jzvd.releaseAllVideos();
- jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
- , "饺子回来了", JzvdStd.SCREEN_NORMAL, JZMediaSystem.class);
+ jzvdStd.setUp(UrlsKt.getVideos()[1]
+ , UrlsKt.getTitles()[1], JzvdStd.SCREEN_NORMAL, JZMediaSystem.class);
jzvdStd.startVideo();
Toast.makeText(this, "Change to MediaPlayer", Toast.LENGTH_SHORT).show();
}
public void clickChangeToExo(View view) {
Jzvd.releaseAllVideos();
- jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
- , "饺子追星", JzvdStd.SCREEN_NORMAL, JZMediaExo.class);
+ jzvdStd.setUp(UrlsKt.getVideos()[1]
+ , UrlsKt.getTitles()[1], JzvdStd.SCREEN_NORMAL, JZMediaExo.class);
jzvdStd.startVideo();
Toast.makeText(this, "Change to ExoPlayer", Toast.LENGTH_SHORT).show();
}
public void clickChangeToAliyun(View view) {
Jzvd.releaseAllVideos();
-// jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
-// , "饺子梭哈", JzvdStd.SCREEN_NORMAL, JZMediaAliyun.class);
jzvdStd.setMediaInterface(JZMediaAliyun.class);
jzvdStd.startVideo();
Toast.makeText(this, "Change to AliyunPlayer", Toast.LENGTH_SHORT).show();
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java
index adf60ff0..9cb76489 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/OrientationActivity.java
@@ -9,10 +9,11 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
/**
* Created by Nathen on 2016/12/30.
@@ -30,10 +31,10 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
getSupportActionBar().setTitle(getString(R.string.orientation));
setContentView(R.layout.activity_orientation);
mJzvdStd = findViewById(R.id.jz_video);
- mJzvdStd.setUp(Urls.videoUrlList[0], "饺子会旋转"
+ mJzvdStd.setUp(UrlsKt.getVideos()[25], UrlsKt.getTitles()[25]
, JzvdStd.SCREEN_NORMAL);
Glide.with(this)
- .load(Urls.videoPosterList[0])
+ .load(UrlsKt.getThumbnails()[25])
.into(mJzvdStd.posterImageView);
}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/PreloadingActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/PreloadingActivity.java
index ddb9b24b..6365e1cd 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/PreloadingActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/PreloadingActivity.java
@@ -8,6 +8,8 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.CustomMedia.JZMediaIjk;
@@ -28,17 +30,10 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
setContentView(R.layout.activity_preloading);
jzvdStd = findViewById(R.id.jz_video);
-// jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
-// , "饺子快长大", Jzvd.SCREEN_NORMAL, JZMediaIjk.class);
- jzvdStd.setUp("http://jzvd.nathen.cn/4f965ad507ef4194a60a943a34cfe147/32af151ea132471f92c9ced2cff785ea-5287d2089db37e62345123a1be272f8b.mp4"
- , "饺子存钱", Jzvd.SCREEN_NORMAL, JZMediaIjk.class);
-
-
-// jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
-// , "饺子快长大");
-// jzvdStd.setUp("http://jzvd.nathen.cn/4f965ad507ef4194a60a943a34cfe147/32af151ea132471f92c9ced2cff785ea-5287d2089db37e62345123a1be272f8b.mp4"
-// , "饺子快长大");
- Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(jzvdStd.posterImageView);
+ jzvdStd.setUp(UrlsKt.getTitles()[7]
+ , UrlsKt.getTitles()[7], Jzvd.SCREEN_NORMAL, JZMediaIjk.class);
+
+ Glide.with(this).load(UrlsKt.getTitles()[7]).into(jzvdStd.posterImageView);
}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/RotationVideoSizeActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/RotationVideoSizeActivity.java
index 83715dac..21959946 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/RotationVideoSizeActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/RotationVideoSizeActivity.java
@@ -9,10 +9,11 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
/**
* Created by Nathen on 2017/11/2.
@@ -33,10 +34,10 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
setContentView(R.layout.activity_api_rotation_videosize);
myJzvdStd = findViewById(R.id.jz_video);
- myJzvdStd.setUp(Urls.videoUrls[0][7], Urls.videoTitles[0][7]
+ myJzvdStd.setUp(UrlsKt.getVideos()[30], UrlsKt.getTitles()[30]
, JzvdStd.SCREEN_NORMAL);
Glide.with(this)
- .load(Urls.videoPosters[0][7])
+ .load(UrlsKt.getThumbnails()[30])
.into(myJzvdStd.posterImageView);
// The Point IS 或者这样写也可以
// myJzvdStd.videoRotation = 180;
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/ScreenRotateActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/ScreenRotateActivity.java
index b83c304d..ae30b3a0 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/ScreenRotateActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_1_Basic/ScreenRotateActivity.java
@@ -8,10 +8,11 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
import cn.jzvd.demo.utils.ScreenRotateUtils;
/**
@@ -30,10 +31,10 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
getSupportActionBar().setTitle(getString(R.string.screen_rotate));
setContentView(R.layout.activity_screen_rotate);
mJzvdStd = findViewById(R.id.jz_video);
- mJzvdStd.setUp(Urls.videoUrlList[0], "饺子挺好"
+ mJzvdStd.setUp(UrlsKt.getVideos()[16], UrlsKt.getTitles()[16]
, JzvdStd.SCREEN_NORMAL);
Glide.with(this)
- .load(Urls.videoPosterList[0])
+ .load(UrlsKt.getThumbnails()[16])
.into(mJzvdStd.posterImageView);
ScreenRotateUtils.getInstance(this.getApplicationContext()).setOrientationChangeListener(this);
}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
index 99823336..d03ebb57 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
@@ -11,6 +11,8 @@
import com.google.android.material.tabs.TabLayout;
+import org.jzvd.jzvideo.UrlsKt;
+
import java.util.ArrayList;
import java.util.List;
@@ -21,7 +23,6 @@
import cn.jzvd.demo.Tab_2_Custom.AGVideo.popup.VideoSpeedPopup;
import cn.jzvd.demo.CustomMedia.JZMediaExo;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
import cn.jzvd.demo.utils.ScreenRotateUtils;
public class AGVideoActivity extends AppCompatActivity implements AGVideo.JzVideoListener, ScreenRotateUtils.OrientationChangeListener
@@ -314,8 +315,8 @@ public void onEpisodeClickListener(AGEpsodeEntity entity, int position) {
private void initVideoData() {
episodeList = new ArrayList<>();
- for (int i = 0; i < Urls.ssVideos.length; i++) {
- episodeList.add(new AGEpsodeEntity(Urls.ssVideos[i], "三生三世枕上书 第" + (i + 1) + "集"));
+ for (int i = 0; i < UrlsKt.getLdjVideos().length; i++) {
+ episodeList.add(new AGEpsodeEntity(UrlsKt.getLdjVideos()[i], "鹿鼎记 第" + (i + 1) + "集"));
}
}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java
index 6e8518c5..c21fb794 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java
@@ -10,6 +10,8 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import java.util.LinkedHashMap;
import cn.jzvd.JZDataSource;
@@ -18,7 +20,6 @@
import cn.jzvd.demo.ApplicationDemo;
import cn.jzvd.demo.CustomJzvd.JzvdStdGetGif;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
/**
* @author dl
@@ -50,17 +51,17 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
jzvdStdGetGif = findViewById(R.id.jz_video);
LinkedHashMap map = new LinkedHashMap();
- String proxyUrl = ApplicationDemo.getProxy(getBaseContext()).getProxyUrl(Urls.clarities[0]);
+ String proxyUrl = ApplicationDemo.getProxy(getBaseContext()).getProxyUrl("http://videos.jzvd.org/ldj/01-ldj.mp4");
map.put("高清", proxyUrl);
- map.put("标清", Urls.clarities[1]);
- map.put("普清", Urls.clarities[2]);
- JZDataSource jzDataSource = new JZDataSource(map, "饺子会拼图");
+ map.put("标清", "http://videos.jzvd.org/ldj/01-ldj.mp4");
+ map.put("普清", "http://videos.jzvd.org/ldj/04-ldj.mp4");
+ JZDataSource jzDataSource = new JZDataSource(map, "饺子不信");
jzDataSource.looping = true;
jzDataSource.currentUrlIndex = 2;
jzDataSource.headerMap.put("key", "value");//header
jzvdStdGetGif.setUp(jzDataSource
, JzvdStd.SCREEN_NORMAL);
- Glide.with(this).load(Urls.videoPosterList[0]).into(jzvdStdGetGif.posterImageView);
+ Glide.with(this).load(UrlsKt.getThumbnails()[0]).into(jzvdStdGetGif.posterImageView);
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/FragmentDemo.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/FragmentDemo.java
index debbbb14..e098885c 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/FragmentDemo.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/FragmentDemo.java
@@ -10,10 +10,11 @@
import androidx.fragment.app.Fragment;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.demo.Tab_3_List.ListView.adapter.ListViewAdapter;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
/**
* Created by Nathen on 2017/6/9.
@@ -38,9 +39,9 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInastanceState) {
listView = (ListView) inflater.inflate(R.layout.layout_list, container, false);
listView.setAdapter(new ListViewAdapter(getActivity(),
- Urls.videoUrls[index],
- Urls.videoTitles[index],
- Urls.videoPosters[index]));
+ UrlsKt.getVll()[index],
+ UrlsKt.getTll()[index],
+ UrlsKt.getPll()[index]));
listView.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/ListViewMultiHolderActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/ListViewMultiHolderActivity.java
index 576561b1..f6917b71 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/ListViewMultiHolderActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/ListViewMultiHolderActivity.java
@@ -15,10 +15,11 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
/**
* Created by Nathen
@@ -132,11 +133,11 @@ public View getView(int position, View convertView, ViewGroup parent) {
}
viewHolder.jzvdStd.setUp(
- Urls.videoUrls[0][position],
- Urls.videoTitles[0][position], Jzvd.SCREEN_NORMAL);
+ UrlsKt.getVideos()[position],
+ UrlsKt.getTitles()[position], Jzvd.SCREEN_NORMAL);
viewHolder.jzvdStd.positionInList = position;
Glide.with(ListViewMultiHolderActivity.this)
- .load(Urls.videoPosters[0][position])
+ .load(UrlsKt.getThumbnails()[position])
.into(viewHolder.jzvdStd.posterImageView);
} else {
TextViewHolder textViewHolder;
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/NormalListViewActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/NormalListViewActivity.java
index b7d620de..52aa05ee 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/NormalListViewActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/NormalListViewActivity.java
@@ -10,10 +10,11 @@
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.demo.Tab_3_List.ListView.adapter.ListViewAdapter;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
/**
* Created by Nathen on 16/7/31.
@@ -36,9 +37,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
listView = findViewById(R.id.listview);
listView.setAdapter(new ListViewAdapter(this,
- Urls.videoUrls[0],
- Urls.videoTitles[0],
- Urls.videoPosters[0]));
+ UrlsKt.getVl3(),
+ UrlsKt.getTl3(),
+ UrlsKt.getPl3()));
listView.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java
index 182cbb1c..d9d7198b 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/RecyclerViewActivity.java
@@ -3,22 +3,27 @@
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
+
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
+
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.scwang.smart.refresh.layout.api.RefreshLayout;
import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+
+import org.jzvd.jzvideo.UrlsKt;
+
import java.util.ArrayList;
import java.util.Collections;
+
import cn.jzvd.Jzvd;
import cn.jzvd.demo.Tab_3_List.ListView.adapter.RecyclerViewLoadMoreAdapter;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Tab_3_List.ListView.entity.VideoEntity;
-import cn.jzvd.demo.Urls;
+import cn.jzvd.demo.utils.VideoEntity;
/**
* Created by yujunkui on 16/8/29.
@@ -28,6 +33,7 @@ public class RecyclerViewActivity extends AppCompatActivity {
RecyclerViewLoadMoreAdapter adapterVideoList;
SmartRefreshLayout refreshLayout;
ArrayList videos;
+
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -82,7 +88,7 @@ public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newStat
LinearLayoutManager linearLayoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
int lastPositon = linearLayoutManager.findLastVisibleItemPosition();
int count = recyclerView.getAdapter().getItemCount();
- if(newState == RecyclerView.SCROLL_STATE_IDLE && count > 3 && lastPositon >= count - 3){
+ if (newState == RecyclerView.SCROLL_STATE_IDLE && count > 3 && lastPositon >= count - 3) {
loadMore();
}
}
@@ -103,17 +109,17 @@ private void initData() {
videos = new ArrayList<>();
addData();
recyclerView.setLayoutManager(new LinearLayoutManager(this));
- adapterVideoList = new RecyclerViewLoadMoreAdapter(this,videos);
+ adapterVideoList = new RecyclerViewLoadMoreAdapter(this, videos);
recyclerView.setAdapter(adapterVideoList);
}
private void addData() {
ArrayList tempList = new ArrayList<>();
- for (int i = 0; i < Urls.videoUrls[0].length; i++) {
+ for (int i = 0; i < UrlsKt.getVl2().length; i++) {
VideoEntity videoEntity = new VideoEntity();
- videoEntity.setUrl(Urls.videoUrls[0][i]);
- videoEntity.setTitle(Urls.videoTitles[0][i]);
- videoEntity.setThumb(Urls.videoPosters[0][i]);
+ videoEntity.setUrl(UrlsKt.getVl2()[i]);
+ videoEntity.setTitle(UrlsKt.getTl2()[i]);
+ videoEntity.setThumb(UrlsKt.getPl2()[i]);
tempList.add(videoEntity);
}
//随机打乱
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/CommentAdapter.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/CommentAdapter.java
index 2289f040..e0e437a4 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/CommentAdapter.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/CommentAdapter.java
@@ -11,8 +11,9 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
public class CommentAdapter extends RecyclerView.Adapter {
@@ -27,10 +28,13 @@ public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
- Glide.with(holder.ivHead.getContext()).load(Urls.videoPosters[0][position])
+ Glide.with(holder.ivHead.getContext()).load(
+ UrlsKt.getPl1()[position])
.into(holder.ivHead);
- holder.tvName.setText(Urls.videoTitles[0][position]);
- holder.tvContent.setText(Urls.videoTitles[0][position]);
+ holder.tvName.setText(
+ UrlsKt.getTl1()[position]);
+ holder.tvContent.setText(
+ UrlsKt.getVl1()[position]);
}
@Override
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java
index 06563580..22a8bdf4 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java
@@ -11,13 +11,11 @@
import com.bumptech.glide.Glide;
-import java.util.ArrayList;
+import org.jzvd.jzvideo.UrlsKt;
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Tab_3_List.ListView.entity.VideoEntity;
-import cn.jzvd.demo.Urls;
public class RecyclerViewAdapter extends RecyclerView.Adapter {
@@ -43,9 +41,12 @@ public void onBindViewHolder(MyViewHolder holder, int position) {
Log.i(TAG, "onBindViewHolder [" + holder.jzvdStd.hashCode() + "] position=" + position);
holder.jzvdStd.setUp(
- Urls.videoUrls[0][position],
- Urls.videoTitles[0][position], Jzvd.SCREEN_NORMAL);
- Glide.with(holder.jzvdStd.getContext()).load(Urls.videoPosters[0][position]).into(holder.jzvdStd.posterImageView);
+
+ UrlsKt.getVl1()[position],
+
+ UrlsKt.getTl1()[position], Jzvd.SCREEN_NORMAL);
+ Glide.with(holder.jzvdStd.getContext()).load(
+ UrlsKt.getPl1()[position]).into(holder.jzvdStd.posterImageView);
}
@Override
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewLoadMoreAdapter.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewLoadMoreAdapter.java
index aef4d402..0a4f23c9 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewLoadMoreAdapter.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewLoadMoreAdapter.java
@@ -16,8 +16,7 @@
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Tab_3_List.ListView.entity.VideoEntity;
-import cn.jzvd.demo.Urls;
+import cn.jzvd.demo.utils.VideoEntity;
public class RecyclerViewLoadMoreAdapter extends RecyclerView.Adapter {
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewTinyAdapter.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewTinyAdapter.java
index 01a9be41..1981ee6d 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewTinyAdapter.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewTinyAdapter.java
@@ -11,10 +11,11 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.demo.CustomJzvd.JzvdStdTinyWindow;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
public class RecyclerViewTinyAdapter extends RecyclerView.Adapter {
@@ -41,9 +42,9 @@ public void onBindViewHolder(MyViewHolder holder, int position) {
if (holder.jzvdStd.getTag() != null)
holder.jzvdStd = ((View) holder.jzvdStd.getTag()).findViewById(R.id.videoplayer);
holder.jzvdStd.setUp(
- Urls.videoUrls[0][position],
- Urls.videoTitles[0][position], Jzvd.SCREEN_NORMAL);
- Glide.with(holder.jzvdStd.getContext()).load(Urls.videoPosters[0][position]).into(holder.jzvdStd.posterImageView);
+ UrlsKt.getVl1()[position],
+ UrlsKt.getVl1()[position], Jzvd.SCREEN_NORMAL);
+ Glide.with(holder.jzvdStd.getContext()).load(UrlsKt.getVl1()[position]).into(holder.jzvdStd.posterImageView);
}
@Override
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/SmoothRecyclerViewAdapter.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/SmoothRecyclerViewAdapter.java
index f4184b73..066cf473 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/SmoothRecyclerViewAdapter.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/SmoothRecyclerViewAdapter.java
@@ -11,10 +11,11 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.demo.CustomJzvd.JzvdStdRv;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
import cn.jzvd.demo.utils.AutoPlayUtils;
import cn.jzvd.demo.utils.ViewAttr;
@@ -64,9 +65,10 @@ public void onBindViewHolder(MyViewHolder holder, int position) {
jzvdStdRv = (JzvdStdRv) holder.container.getChildAt(0);
}
jzvdStdRv.setUp(
- Urls.videoUrls[0][position],
- Urls.videoTitles[0][position], Jzvd.SCREEN_NORMAL);
- Glide.with(holder.container.getContext()).load(Urls.videoPosters[0][position])
+ UrlsKt.getVl1()[position],
+ UrlsKt.getTl1()[position], Jzvd.SCREEN_NORMAL);
+ Glide.with(holder.container.getContext()).load(
+ UrlsKt.getPl1()[position])
.into(jzvdStdRv.posterImageView);
}
jzvdStdRv.setId(R.id.jzvdplayer);
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/tiktok/TikTokRecyclerViewAdapter.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/tiktok/TikTokRecyclerViewAdapter.java
index e6c245c9..f1ae9713 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/tiktok/TikTokRecyclerViewAdapter.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/tiktok/TikTokRecyclerViewAdapter.java
@@ -11,11 +11,12 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.JZDataSource;
import cn.jzvd.Jzvd;
import cn.jzvd.demo.CustomJzvd.JzvdStdTikTok;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
public class TikTokRecyclerViewAdapter extends RecyclerView.Adapter {
@@ -40,11 +41,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(Urls.videoUrls[3][position],
- Urls.videoTitles[0][position]);
+ JZDataSource jzDataSource = new JZDataSource(UrlsKt.getVl1()[position],
+ UrlsKt.getTl1()[position]);
jzDataSource.looping = true;
holder.jzvdStd.setUp(jzDataSource, Jzvd.SCREEN_NORMAL);
- Glide.with(holder.jzvdStd.getContext()).load(Urls.videoPosters[0][position]).into(holder.jzvdStd.posterImageView);
+ Glide.with(holder.jzvdStd.getContext()).load(UrlsKt.getPl1()[position]).into(holder.jzvdStd.posterImageView);
}
@Override
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/TinyWindow/TinyWindowRecycleViewMultiHolderActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/TinyWindow/TinyWindowRecycleViewMultiHolderActivity.java
index e2882091..43fd7a69 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/TinyWindow/TinyWindowRecycleViewMultiHolderActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/TinyWindow/TinyWindowRecycleViewMultiHolderActivity.java
@@ -15,11 +15,12 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.CustomJzvd.JzvdStdTinyWindow;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
/**
* Created by Nathen on 2017/11/1.
@@ -132,11 +133,9 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
TextHolder textHolder = (TextHolder) holder;
} else {
VideoHolder videoHolder = (VideoHolder) holder;
- videoHolder.jzvdStd.setUp(
- Urls.videoUrls[0][position],
- Urls.videoTitles[0][position], Jzvd.SCREEN_NORMAL);
+ videoHolder.jzvdStd.setUp(UrlsKt.getVl1()[position], UrlsKt.getTl1()[position], Jzvd.SCREEN_NORMAL);
videoHolder.jzvdStd.positionInList = position;
- Glide.with(TinyWindowRecycleViewMultiHolderActivity.this).load(Urls.videoPosters[0][position]).into(videoHolder.jzvdStd.posterImageView);
+ Glide.with(TinyWindowRecycleViewMultiHolderActivity.this).load(UrlsKt.getPl1()[position]).into(videoHolder.jzvdStd.posterImageView);
}
}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java
index cacb1dd2..a3ea025f 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DanmuActivity.java
@@ -1,37 +1,22 @@
package cn.jzvd.demo.Tab_4_More;
-import android.content.pm.PackageManager;
import android.os.Bundle;
-import android.os.Environment;
import android.os.Handler;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
-import android.widget.Toast;
-import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
-import androidx.core.app.ActivityCompat;
import com.bumptech.glide.Glide;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Random;
+import org.jzvd.jzvideo.UrlsKt;
import cn.jzvd.JZUtils;
import cn.jzvd.Jzvd;
-import cn.jzvd.JzvdStd;
import cn.jzvd.demo.CustomJzvd.JzvdDanmu;
-import cn.jzvd.demo.CustomJzvd.JzvdStdAssert;
-import cn.jzvd.demo.CustomMedia.JZMediaSystemAssertFolder;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
-import master.flame.danmaku.ui.widget.DanmakuView;
/**
* @author Liberations
@@ -63,8 +48,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
hideDanmu.setOnClickListener(this);
- jzvdDanmu.setUp(Urls.clarities[2], "饺子键盘侠", Jzvd.SCREEN_NORMAL);
- Glide.with(this).load(Urls.videoPosterList[0]).into(jzvdDanmu.posterImageView);
+ jzvdDanmu.setUp(UrlsKt.getVideos()[14], UrlsKt.getTitles()[14], Jzvd.SCREEN_NORMAL);
+ Glide.with(this).load(UrlsKt.getThumbnails()[14]).into(jzvdDanmu.posterImageView);
testDanmu();
jzvdDanmu.startButton.performClick();
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DirectPlayActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DirectPlayActivity.java
index 2ebb9140..f0bbdb77 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DirectPlayActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_4_More/DirectPlayActivity.java
@@ -8,10 +8,11 @@
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
/**
* Created by Nathen on 16/7/31.
@@ -54,7 +55,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
}
public void clickFullScreen(View view) {
- JzvdStd.startFullscreenDirectly(this, JzvdStd.class, Urls.videoUrlList[6], "饺子辛苦了");
+ JzvdStd.startFullscreenDirectly(this, JzvdStd.class, UrlsKt.getVideos()[15], UrlsKt.getTitles()[15]);
}
public void clickTinyWindow(View view) {
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_4_More/WebViewActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_4_More/WebViewActivity.java
index 30fb298d..50100d1d 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_4_More/WebViewActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_4_More/WebViewActivity.java
@@ -13,11 +13,12 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.JZUtils;
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.R;
-import cn.jzvd.demo.Urls;
/**
* Created by Nathen on 16/10/13.
@@ -73,11 +74,9 @@ public void adViewJiaoZiVideoPlayer(final int width, final int height, final int
runOnUiThread(() -> {
if (index == 0) {
JzvdStd jzvdStd = new JzvdStd(WebViewActivity.this);
- jzvdStd.setUp(Urls.videoUrlList[1], "饺子骑大马",
- Jzvd.SCREEN_NORMAL);
- Glide.with(WebViewActivity.this)
- .load(Urls.videoPosterList[1])
- .into(jzvdStd.posterImageView);
+ jzvdStd.setUp(UrlsKt.getVideos()[16], UrlsKt.getTitles()[16], Jzvd.SCREEN_NORMAL);
+ Glide.with(WebViewActivity.this).load(UrlsKt.getThumbnails()[16]).into(jzvdStd.posterImageView);
+
ViewGroup.LayoutParams ll = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
AbsoluteLayout.LayoutParams layoutParams = new AbsoluteLayout.LayoutParams(ll);
layoutParams.y = JZUtils.dip2px(WebViewActivity.this, top);
@@ -90,11 +89,9 @@ public void adViewJiaoZiVideoPlayer(final int width, final int height, final int
mWebView.addView(linearLayout, layoutParams);
} else {
JzvdStd jzvdStd = new JzvdStd(WebViewActivity.this);
- jzvdStd.setUp(Urls.videoUrlList[2], "饺子失态了",
- Jzvd.SCREEN_NORMAL);
- Glide.with(WebViewActivity.this)
- .load(Urls.videoPosterList[2])
- .into(jzvdStd.posterImageView);
+ jzvdStd.setUp(UrlsKt.getVideos()[16], UrlsKt.getTitles()[16], Jzvd.SCREEN_NORMAL);
+ Glide.with(WebViewActivity.this).load(UrlsKt.getThumbnails()[16]).into(jzvdStd.posterImageView);
+
ViewGroup.LayoutParams ll = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
AbsoluteLayout.LayoutParams layoutParams = new AbsoluteLayout.LayoutParams(ll);
layoutParams.y = JZUtils.dip2px(WebViewActivity.this, top);
diff --git a/demo/src/main/java/cn/jzvd/demo/Urls.java b/demo/src/main/java/cn/jzvd/demo/Urls.java
deleted file mode 100644
index dfbfedfd..00000000
--- a/demo/src/main/java/cn/jzvd/demo/Urls.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package cn.jzvd.demo;
-
-/**
- * Created by shengjun on 16/9/10.
- */
-public class Urls {
- public static String[] clarities = {
- "https://jzvd.nathen.cn/video/460bad24-170c5bc6956-0007-1823-c86-de200.mp4",
- "https://jzvd.nathen.cn/video/2b64c629-17204eaa4fa-0007-1823-c86-de200.mp4",
- "https://jzvd.nathen.cn/video/a70a7fb-17204eaa501-0007-1823-c86-de200.mp4"
- };
- public static String[] videoUrlList = {
- "http://jzvd.nathen.cn/c494b340ff704015bb6682ffde3cd302/64929c369124497593205a4190d7d128-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/63f3f73712544394be981d9e4f56b612/69c5767bb9e54156b5b60a1b6edeb3b5-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/b201be3093814908bf987320361c5a73/2f6d913ea25941ffa78cc53a59025383-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/d2438fd1c37c4618a704513ad38d68c5/68626a9d53ca421c896ac8010f172b68-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/25a8d119cfa94b49a7a4117257d8ebd7/f733e65a22394abeab963908f3c336db-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/7512edd1ad834d40bb5b978402274b1a/9691c7f2d7b74b5e811965350a0e5772-5287d2089db37e62345123a1be272f8b.mp4",
- "http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
- };
-
-
- 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",
- "http://jzvd-pic.nathen.cn/jzvd-pic/a019ffc1-556c-4a85-b70c-b1b49811d577.jpg",
- "http://jzvd-pic.nathen.cn/jzvd-pic/6fc2ae91-36e2-44c5-bb10-29ae5d5c678c.png",
- "http://jzvd-pic.nathen.cn/jzvd-pic/f03cee95-9b78-4dd5-986f-d162c06c385c.png",
- "http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png",
- ""
-
- };
-
-
-}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/entity/VideoEntity.java b/demo/src/main/java/cn/jzvd/demo/utils/VideoEntity.java
similarity index 91%
rename from demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/entity/VideoEntity.java
rename to demo/src/main/java/cn/jzvd/demo/utils/VideoEntity.java
index 28fd3f20..1f45abd9 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/entity/VideoEntity.java
+++ b/demo/src/main/java/cn/jzvd/demo/utils/VideoEntity.java
@@ -1,4 +1,4 @@
-package cn.jzvd.demo.Tab_3_List.ListView.entity;
+package cn.jzvd.demo.utils;
public class VideoEntity {
private String url;
diff --git a/demo/src/main/java/org/jzvd/jzvideo/urls.kt b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
index ee5d4aea..8cac6f64 100644
--- a/demo/src/main/java/org/jzvd/jzvideo/urls.kt
+++ b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
@@ -1,5 +1,7 @@
package org.jzvd.jzvideo
+// Chrome浏览器和饺子demo(android.MediaPlayer)相同时间相同网络环境播放,速度相差很远,为什么。
+// ijk好像略快,但没有电脑的chrome快。红米手机的自带浏览器可以完整观看视频无需中途加载。
val ldjVideos = arrayOf(
"http://videos.jzvd.org/v/ldj/01-ldj.mp4",
@@ -139,10 +141,30 @@ val titles = arrayOf(
"饺子不服"
)
-val list1 = videos.copyOfRange(3, 9)
-val list2 = videos.copyOfRange(1, 6)
-val list3 = videos.copyOfRange(0, 3)
+val vl1 = videos.copyOfRange(3, 9)
+val pl1 = videos.copyOfRange(3, 9)
+val tl1 = videos.copyOfRange(3, 9)
+val vl2 = videos.copyOfRange(10, 20)
+val pl2 = videos.copyOfRange(10, 20)
+val tl2 = videos.copyOfRange(10, 20)
+
+val vl3 = videos.copyOfRange(20, 21)
+val pl3 = videos.copyOfRange(20, 21)
+val tl3 = videos.copyOfRange(20, 21)
+
+
+val vll = arrayOf(
+ vl1, vl2, vl3
+)
+
+val pll = arrayOf(
+ pl1, pl2, pl3
+)
+
+val tll = arrayOf(
+ tl1, tl2, tl3
+)
diff --git a/library/build.gradle b/library/build.gradle
index 602bf142..ffc31e51 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
android {
compileSdkVersion 30
- buildToolsVersion = '30.0.2'
+ buildToolsVersion = '30.0.3'
defaultConfig {
minSdkVersion 16
From 2a7dd4321161e2b1711e13e8b670bf8f29c359ac Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Sat, 19 Dec 2020 02:21:40 +0800
Subject: [PATCH 43/52] urls
---
demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java | 6 +++---
.../main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
index e849af14..6c6c758f 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
@@ -70,10 +70,10 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
LinkedHashMap map = new LinkedHashMap();
- String proxyUrl = ApplicationDemo.getProxy(getContext()).getProxyUrl("http://videos.jzvd.org/ldj/01-ldj.mp4");
+ String proxyUrl = ApplicationDemo.getProxy(getContext()).getProxyUrl("http://videos.jzvd.org/v/ldj/01-ldj.mp4");
map.put("高清", proxyUrl);
- map.put("标清", "http://videos.jzvd.org/ldj/01-ldj.mp4");
- map.put("普清", "http://videos.jzvd.org/ldj/04-ldj.mp4");
+ map.put("标清", "http://videos.jzvd.org/v/ldj/01-ldj.mp4");
+ map.put("普清", "http://videos.jzvd.org/v/ldj/04-ldj.mp4");
JZDataSource jzDataSource = new JZDataSource(map, "饺子不信");
jzDataSource.looping = true;
jzDataSource.currentUrlIndex = 2;
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java
index c21fb794..c409d363 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java
@@ -51,10 +51,10 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
jzvdStdGetGif = findViewById(R.id.jz_video);
LinkedHashMap map = new LinkedHashMap();
- String proxyUrl = ApplicationDemo.getProxy(getBaseContext()).getProxyUrl("http://videos.jzvd.org/ldj/01-ldj.mp4");
+ String proxyUrl = ApplicationDemo.getProxy(getBaseContext()).getProxyUrl("http://videos.jzvd.org/v/ldj/01-ldj.mp4");
map.put("高清", proxyUrl);
- map.put("标清", "http://videos.jzvd.org/ldj/01-ldj.mp4");
- map.put("普清", "http://videos.jzvd.org/ldj/04-ldj.mp4");
+ map.put("标清", "http://videos.jzvd.org/v/ldj/01-ldj.mp4");
+ map.put("普清", "http://videos.jzvd.org/v/ldj/04-ldj.mp4");
JZDataSource jzDataSource = new JZDataSource(map, "饺子不信");
jzDataSource.looping = true;
jzDataSource.currentUrlIndex = 2;
From 03f52ce3fdfaeea3fec5a69a8053fd8b23081ac8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E6=99=97=E5=93=B2?=
Date: Sat, 19 Dec 2020 09:03:20 +0800
Subject: [PATCH 44/52] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E6=97=A0=E7=94=A8?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../demo/Tab_2_Custom/AGVideo/AGVideoActivity.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
index 69a6ee93..28cc8771 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
@@ -49,9 +49,9 @@ private void initView() {
mPlayer = findViewById(R.id.ag_player);
initEpisodesTablayout();
mPlayer.setJzVideoListener(this);
- mJzDataSource = new JZDataSource(ApplicationDemo.getProxy(AGVideoActivity.this).getProxyUrl(episodeList.get(0).getVideoUrl()), episodeList.get(0).getVideoName());
- //mPlayer.setUp(mJzDataSource, JzvdStd.SCREEN_NORMAL, JZMediaExo.class);
- mPlayer.setUp(mJzDataSource, JzvdStd.SCREEN_NORMAL);
+ mJzDataSource = new JZDataSource(episodeList.get(0).getVideoUrl(), episodeList.get(0).getVideoName());
+ mPlayer.setUp(mJzDataSource
+ , JzvdStd.SCREEN_NORMAL, JZMediaExo.class);
mPlayer.startVideo();
}
@@ -87,9 +87,8 @@ public void onTabSelected(TabLayout.Tab tab) {
//定义方法,判断是否选中
int tag = Integer.parseInt(tab.getText().toString());
AGEpsodeEntity entity = episodeList.get(tag - 1);
- mJzDataSource = new JZDataSource(ApplicationDemo.getProxy(AGVideoActivity.this).getProxyUrl(entity.getVideoUrl()), entity.getVideoName());
+ mJzDataSource = new JZDataSource(entity.getVideoUrl(), entity.getVideoName());
updateTabView(tab, true);
-
playChangeUrl();
isNext(tab.getPosition());
}
@@ -256,7 +255,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
public void nextClick() {
int position = episodes.getSelectedTabPosition() + 1;
AGEpsodeEntity entity = episodeList.get(position);
- mJzDataSource = new JZDataSource(ApplicationDemo.getProxy(AGVideoActivity.this).getProxyUrl(entity.getVideoUrl()), entity.getVideoName());
+ mJzDataSource = new JZDataSource(entity.getVideoUrl(), entity.getVideoName());
TabLayout.Tab tab = episodes.getTabAt(position);
if (tab != null) {
tab.select();
From 4dbcd8b917dd99593a97adc2d516153c6e5a04b3 Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Sat, 19 Dec 2020 23:05:37 +0800
Subject: [PATCH 45/52] ali urls
---
.../java/cn/jzvd/demo/Fragment_1_Base.java | 10 ++---
.../jzvd/demo/Tab_3_List/GetGifActivity.java | 8 +---
.../TinyWindow/TinyWindowActivity.java | 7 +++-
demo/src/main/java/org/jzvd/jzvideo/urls.kt | 39 +++++++++++++++----
4 files changed, 43 insertions(+), 21 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
index 6c6c758f..381ee3c9 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
@@ -70,18 +70,18 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
LinkedHashMap map = new LinkedHashMap();
- String proxyUrl = ApplicationDemo.getProxy(getContext()).getProxyUrl("http://videos.jzvd.org/v/ldj/01-ldj.mp4");
+ String proxyUrl = ApplicationDemo.getProxy(getContext()).getProxyUrl(UrlsKt.getAliVideos()[0]);
map.put("高清", proxyUrl);
- map.put("标清", "http://videos.jzvd.org/v/ldj/01-ldj.mp4");
- map.put("普清", "http://videos.jzvd.org/v/ldj/04-ldj.mp4");
- JZDataSource jzDataSource = new JZDataSource(map, "饺子不信");
+ map.put("标清", UrlsKt.getAliVideos()[1]);
+ map.put("普清", UrlsKt.getAliVideos()[2]);
+ JZDataSource jzDataSource = new JZDataSource(map, "饺子起立");
jzDataSource.looping = true;
jzDataSource.currentUrlIndex = 2;
jzDataSource.headerMap.put("key", "value");//header
mJzvdStd.setUp(jzDataSource
, JzvdStd.SCREEN_NORMAL);
Jzvd.PROGRESS_DRAG_RATE = 2f;//设置播放进度条手势滑动阻尼系数
- Glide.with(this).load(UrlsKt.getThumbnails()[0]).into(mJzvdStd.posterImageView);
+ Glide.with(this).load(UrlsKt.getAliThumbnail()[0]).into(mJzvdStd.posterImageView);
}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java
index c409d363..054e7eb7 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/GetGifActivity.java
@@ -59,15 +59,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
jzDataSource.looping = true;
jzDataSource.currentUrlIndex = 2;
jzDataSource.headerMap.put("key", "value");//header
- jzvdStdGetGif.setUp(jzDataSource
- , JzvdStd.SCREEN_NORMAL);
+ jzvdStdGetGif.setUp(jzDataSource, JzvdStd.SCREEN_NORMAL);
Glide.with(this).load(UrlsKt.getThumbnails()[0]).into(jzvdStdGetGif.posterImageView);
-
-
-// String url = "http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4";
-// jzvdStdGetGif.setUp(url, "饺子会拼图");
-// Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(jzvdStdGetGif.posterImageView);
}
@Override
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/TinyWindow/TinyWindowActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/TinyWindow/TinyWindowActivity.java
index d1a132aa..197b1914 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/TinyWindow/TinyWindowActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/TinyWindow/TinyWindowActivity.java
@@ -10,6 +10,8 @@
import com.bumptech.glide.Glide;
+import org.jzvd.jzvideo.UrlsKt;
+
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.CustomJzvd.JzvdStdTinyWindow;
@@ -34,10 +36,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
setContentView(R.layout.activity_tiny_window);
jzvdStdTinyWindow = findViewById(R.id.jz_video);
- jzvdStdTinyWindow.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4", "饺子快长大"
+ jzvdStdTinyWindow.setUp(UrlsKt.getVideos()[9],
+ UrlsKt.getTitles()[9]
, JzvdStd.SCREEN_NORMAL);
Glide.with(this)
- .load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png")
+ .load(UrlsKt.getThumbnails()[9])
.into(jzvdStdTinyWindow.posterImageView);
}
diff --git a/demo/src/main/java/org/jzvd/jzvideo/urls.kt b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
index 8cac6f64..9e514108 100644
--- a/demo/src/main/java/org/jzvd/jzvideo/urls.kt
+++ b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
@@ -50,6 +50,25 @@ val ldjVideos = arrayOf(
"http://videos.jzvd.org/v/ldj/44-ldj.mp4",
"http://videos.jzvd.org/v/ldj/45-ldj.mp4"
)
+val aliVideos = arrayOf(
+ "https://jzvd.nathen.cn/video/cfe6c30-1767b1bc21f-0007-1823-c86-de200.mp4",//三个不同分辨率
+ "https://jzvd.nathen.cn/0339d49439f947419576c33a0aa51545/79e1a938b0d2435d85bd964a77640506-f4e986e3e38ed3f473f7ba82bc07e188-ld.mp4",
+ "https://jzvd.nathen.cn/0339d49439f947419576c33a0aa51545/79e1a938b0d2435d85bd964a77640506-8924c7da92ebd789d315bc5de0a81059-fd.mp4",
+
+ "https://jzvd.nathen.cn/video/59aa468b-1767b6d891e-0007-1823-c86-de200.mp4",//饺子还小
+ "https://jzvd.nathen.cn/video/25ae1b1c-1767b2a5e44-0007-1823-c86-de200.mp4",//饺子还年轻
+ "https://jzvd.nathen.cn/video/5a6465ff-1767b2a5e28-0007-1823-c86-de200.mp4",
+)
+
+val aliThumbnail = arrayOf(
+ "https://jzvd.nathen.cn/snapshot/0339d49439f947419576c33a0aa5154500005.jpg",
+ "",
+ "",
+
+ "https://jzvd.nathen.cn/snapshot/61c99f9225c04b24a1d0374e9a3f006700004.jpg",
+ "https://jzvd.nathen.cn/snapshot/044ef6cf452d48b795cea0a96ee4ea4100002.jpg",
+ "https://jzvd.nathen.cn/snapshot/a172cc6442ff40ffb826829fc78f83b700005.jpg"
+)
val videos = arrayOf(
"http://videos.jzvd.org/v/饺子还年轻.mp4",
@@ -62,6 +81,7 @@ val videos = arrayOf(
"http://videos.jzvd.org/v/饺子想听.mp4",
"http://videos.jzvd.org/v/饺子想吹.mp4",
"http://videos.jzvd.org/v/饺子汪汪.mp4",
+
"http://videos.jzvd.org/v/饺子偷人.mp4",
"http://videos.jzvd.org/v/饺子挺住.mp4",
"http://videos.jzvd.org/v/饺子跳.mp4",
@@ -72,6 +92,7 @@ val videos = arrayOf(
"http://videos.jzvd.org/v/饺子可以了.mp4",
"http://videos.jzvd.org/v/饺子可以.mp4",
"http://videos.jzvd.org/v/饺子好妈妈.mp4",
+
"http://videos.jzvd.org/v/饺子还小.mp4",
"http://videos.jzvd.org/v/饺子高兴.mp4",
"http://videos.jzvd.org/v/饺子高冷.mp4",
@@ -92,6 +113,7 @@ val thumbnails = arrayOf(
"http://videos.jzvd.org/v/饺子想听.jpg",
"http://videos.jzvd.org/v/饺子想吹.jpg",
"http://videos.jzvd.org/v/饺子汪汪.jpg",
+
"http://videos.jzvd.org/v/饺子偷人.jpg",
"http://videos.jzvd.org/v/饺子挺住.jpg",
"http://videos.jzvd.org/v/饺子跳.jpg",
@@ -102,6 +124,7 @@ val thumbnails = arrayOf(
"http://videos.jzvd.org/v/饺子可以了.jpg",
"http://videos.jzvd.org/v/饺子可以.jpg",
"http://videos.jzvd.org/v/饺子好妈妈.jpg",
+
"http://videos.jzvd.org/v/饺子还小.jpg",
"http://videos.jzvd.org/v/饺子高兴.jpg",
"http://videos.jzvd.org/v/饺子高冷.jpg",
@@ -122,6 +145,7 @@ val titles = arrayOf(
"饺子想听",
"饺子想吹",
"饺子汪汪",
+
"饺子偷人",
"饺子挺住",
"饺子跳",
@@ -132,6 +156,7 @@ val titles = arrayOf(
"饺子可以了",
"饺子可以",
"饺子好妈妈",
+
"饺子还小",
"饺子高兴",
"饺子高冷",
@@ -142,16 +167,16 @@ val titles = arrayOf(
)
val vl1 = videos.copyOfRange(3, 9)
-val pl1 = videos.copyOfRange(3, 9)
-val tl1 = videos.copyOfRange(3, 9)
+val pl1 = thumbnails.copyOfRange(3, 9)
+val tl1 = titles.copyOfRange(3, 9)
val vl2 = videos.copyOfRange(10, 20)
-val pl2 = videos.copyOfRange(10, 20)
-val tl2 = videos.copyOfRange(10, 20)
+val pl2 = thumbnails.copyOfRange(10, 20)
+val tl2 = titles.copyOfRange(10, 20)
-val vl3 = videos.copyOfRange(20, 21)
-val pl3 = videos.copyOfRange(20, 21)
-val tl3 = videos.copyOfRange(20, 21)
+val vl3 = videos.copyOfRange(20, 25)
+val pl3 = thumbnails.copyOfRange(20, 25)
+val tl3 = titles.copyOfRange(20, 25)
val vll = arrayOf(
From 5022ed026d79ade2c699cb0c9e31a4de51e58075 Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Thu, 24 Dec 2020 17:01:27 +0800
Subject: [PATCH 46/52] build succ
---
build.gradle | 2 +-
.../java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index 15142398..c991cbcc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = '1.4.20'
+ ext.kotlin_version = '1.4.21'
repositories {
jcenter()
google()
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
index 28cc8771..5d3b146f 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_2_Custom/AGVideo/AGVideoActivity.java
@@ -17,6 +17,7 @@
import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.ApplicationDemo;
+import cn.jzvd.demo.CustomMedia.JZMediaExo;
import cn.jzvd.demo.R;
import cn.jzvd.demo.Tab_2_Custom.AGVideo.popup.VideoEpisodePopup;
import cn.jzvd.demo.Tab_2_Custom.AGVideo.popup.VideoSpeedPopup;
From 135f4c8fad7180d904d8aa68f1b720a390c4960a Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Sat, 26 Dec 2020 05:03:30 +0800
Subject: [PATCH 47/52] change server
---
.../java/cn/jzvd/demo/Fragment_1_Base.java | 16 +-
demo/src/main/java/org/jzvd/jzvideo/urls.kt | 216 +++++++++---------
.../{fragment_api.xml => fragment_base.xml} | 18 ++
3 files changed, 145 insertions(+), 105 deletions(-)
rename demo/src/main/res/layout/{fragment_api.xml => fragment_base.xml} (78%)
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
index 381ee3c9..dc61b427 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
@@ -8,6 +8,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
+import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
@@ -39,25 +40,30 @@ public class Fragment_1_Base extends Fragment implements View.OnClickListener {
private JzvdStd mJzvdStd;
private Button mOrientation,
mRotationAndVideoSize, mCustomMediaPlayer, mPreLoading, mScreenRotate;
+ private Button serverCn, serverUs;
private Jzvd.JZAutoFullscreenListener mSensorEventListener;
private SensorManager mSensorManager;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- View view = View.inflate(getContext(), R.layout.fragment_api, null);
+ View view = View.inflate(getContext(), R.layout.fragment_base, null);
mJzvdStd = view.findViewById(R.id.jz_video);
mOrientation = view.findViewById(R.id.orientation);
mRotationAndVideoSize = view.findViewById(R.id.rotation_and_videosize);
mCustomMediaPlayer = view.findViewById(R.id.custom_mediaplayer);
mPreLoading = view.findViewById(R.id.preloading);
mScreenRotate = view.findViewById(R.id.screen_rotate);
+ serverCn = view.findViewById(R.id.server_cn);
+ serverUs = view.findViewById(R.id.server_us);
mOrientation.setOnClickListener(this);
mRotationAndVideoSize.setOnClickListener(this);
mCustomMediaPlayer.setOnClickListener(this);
mPreLoading.setOnClickListener(this);
mScreenRotate.setOnClickListener(this);
+ serverCn.setOnClickListener(this);
+ serverUs.setOnClickListener(this);
mSensorManager = (SensorManager) getContext().getSystemService(SENSOR_SERVICE);
mSensorEventListener = new Jzvd.JZAutoFullscreenListener();
@@ -121,6 +127,14 @@ public void onClick(View view) {
case R.id.screen_rotate:
startActivity(new Intent(getContext(), ScreenRotateActivity.class));
break;
+ case R.id.server_cn:
+ UrlsKt.setServer_name(UrlsKt.getCn());
+ Toast.makeText(getContext(), "change server to: " + UrlsKt.getCn(), Toast.LENGTH_SHORT).show();
+ break;
+ case R.id.server_us:
+ UrlsKt.setServer_name(UrlsKt.getUs());
+ Toast.makeText(getContext(), "change server to: " + UrlsKt.getUs(), Toast.LENGTH_SHORT).show();
+ break;
}
}
}
diff --git a/demo/src/main/java/org/jzvd/jzvideo/urls.kt b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
index 9e514108..fee2c82f 100644
--- a/demo/src/main/java/org/jzvd/jzvideo/urls.kt
+++ b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
@@ -3,53 +3,61 @@ package org.jzvd.jzvideo
// Chrome浏览器和饺子demo(android.MediaPlayer)相同时间相同网络环境播放,速度相差很远,为什么。
// ijk好像略快,但没有电脑的chrome快。红米手机的自带浏览器可以完整观看视频无需中途加载。
+
+val cn = "http://8.136.101.204"
+val us = "http://videos.jzvd.org"
+
+var server_name: String = cn;
+
+
val ldjVideos = arrayOf(
- "http://videos.jzvd.org/v/ldj/01-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/02-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/03-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/04-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/05-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/06-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/07-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/08-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/09-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/10-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/11-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/12-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/13-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/14-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/15-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/16-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/17-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/18-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/19-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/20-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/21-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/22-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/23-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/24-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/25-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/26-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/27-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/28-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/29-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/30-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/31-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/32-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/33-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/34-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/35-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/36-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/37-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/38-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/39-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/40-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/41-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/42-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/43-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/44-ldj.mp4",
- "http://videos.jzvd.org/v/ldj/45-ldj.mp4"
+ "$server_name/v/ldj/01-ldj.mp4",
+ "$server_name/v/ldj/02-ldj.mp4",
+ "$server_name/v/ldj/03-ldj.mp4",
+ "$server_name/v/ldj/04-ldj.mp4",
+ "$server_name/v/ldj/05-ldj.mp4",
+ "$server_name/v/ldj/06-ldj.mp4",
+ "$server_name/v/ldj/07-ldj.mp4",
+ "$server_name/v/ldj/08-ldj.mp4",
+ "$server_name/v/ldj/09-ldj.mp4",
+ "$server_name/v/ldj/10-ldj.mp4",
+ "$server_name/v/ldj/11-ldj.mp4",
+ "$server_name/v/ldj/12-ldj.mp4",
+ "$server_name/v/ldj/13-ldj.mp4",
+ "$server_name/v/ldj/14-ldj.mp4",
+ "$server_name/v/ldj/15-ldj.mp4",
+ "$server_name/v/ldj/16-ldj.mp4",
+ "$server_name/v/ldj/17-ldj.mp4",
+ "$server_name/v/ldj/18-ldj.mp4",
+ "$server_name/v/ldj/19-ldj.mp4",
+ "$server_name/v/ldj/20-ldj.mp4",
+ "$server_name/v/ldj/21-ldj.mp4",
+ "$server_name/v/ldj/22-ldj.mp4",
+ "$server_name/v/ldj/23-ldj.mp4",
+ "$server_name/v/ldj/24-ldj.mp4",
+ "$server_name/v/ldj/25-ldj.mp4",
+ "$server_name/v/ldj/26-ldj.mp4",
+ "$server_name/v/ldj/27-ldj.mp4",
+ "$server_name/v/ldj/28-ldj.mp4",
+ "$server_name/v/ldj/29-ldj.mp4",
+ "$server_name/v/ldj/30-ldj.mp4",
+ "$server_name/v/ldj/31-ldj.mp4",
+ "$server_name/v/ldj/32-ldj.mp4",
+ "$server_name/v/ldj/33-ldj.mp4",
+ "$server_name/v/ldj/34-ldj.mp4",
+ "$server_name/v/ldj/35-ldj.mp4",
+ "$server_name/v/ldj/36-ldj.mp4",
+ "$server_name/v/ldj/37-ldj.mp4",
+ "$server_name/v/ldj/38-ldj.mp4",
+ "$server_name/v/ldj/39-ldj.mp4",
+ "$server_name/v/ldj/40-ldj.mp4",
+ "$server_name/v/ldj/41-ldj.mp4",
+ "$server_name/v/ldj/42-ldj.mp4",
+ "$server_name/v/ldj/43-ldj.mp4",
+ "$server_name/v/ldj/44-ldj.mp4",
+ "$server_name/v/ldj/45-ldj.mp4"
)
+
val aliVideos = arrayOf(
"https://jzvd.nathen.cn/video/cfe6c30-1767b1bc21f-0007-1823-c86-de200.mp4",//三个不同分辨率
"https://jzvd.nathen.cn/0339d49439f947419576c33a0aa51545/79e1a938b0d2435d85bd964a77640506-f4e986e3e38ed3f473f7ba82bc07e188-ld.mp4",
@@ -57,7 +65,7 @@ val aliVideos = arrayOf(
"https://jzvd.nathen.cn/video/59aa468b-1767b6d891e-0007-1823-c86-de200.mp4",//饺子还小
"https://jzvd.nathen.cn/video/25ae1b1c-1767b2a5e44-0007-1823-c86-de200.mp4",//饺子还年轻
- "https://jzvd.nathen.cn/video/5a6465ff-1767b2a5e28-0007-1823-c86-de200.mp4",
+ "https://jzvd.nathen.cn/video/5a6465ff-1767b2a5e28-0007-1823-c86-de200.mp4"
)
val aliThumbnail = arrayOf(
@@ -71,67 +79,67 @@ val aliThumbnail = arrayOf(
)
val videos = arrayOf(
- "http://videos.jzvd.org/v/饺子还年轻.mp4",
- "http://videos.jzvd.org/v/饺子主动.mp4",
- "http://videos.jzvd.org/v/饺子真萌.mp4",
- "http://videos.jzvd.org/v/饺子真会.mp4",
- "http://videos.jzvd.org/v/饺子运动.mp4",
- "http://videos.jzvd.org/v/饺子有活.mp4",
- "http://videos.jzvd.org/v/饺子星光.mp4",
- "http://videos.jzvd.org/v/饺子想听.mp4",
- "http://videos.jzvd.org/v/饺子想吹.mp4",
- "http://videos.jzvd.org/v/饺子汪汪.mp4",
-
- "http://videos.jzvd.org/v/饺子偷人.mp4",
- "http://videos.jzvd.org/v/饺子挺住.mp4",
- "http://videos.jzvd.org/v/饺子跳.mp4",
- "http://videos.jzvd.org/v/饺子受不了.mp4",
- "http://videos.jzvd.org/v/饺子三位.mp4",
- "http://videos.jzvd.org/v/饺子起飞.mp4",
- "http://videos.jzvd.org/v/饺子你听.mp4",
- "http://videos.jzvd.org/v/饺子可以了.mp4",
- "http://videos.jzvd.org/v/饺子可以.mp4",
- "http://videos.jzvd.org/v/饺子好妈妈.mp4",
-
- "http://videos.jzvd.org/v/饺子还小.mp4",
- "http://videos.jzvd.org/v/饺子高兴.mp4",
- "http://videos.jzvd.org/v/饺子高冷.mp4",
- "http://videos.jzvd.org/v/饺子堵住了.mp4",
- "http://videos.jzvd.org/v/饺子都懂.mp4",
- "http://videos.jzvd.org/v/饺子打电话.mp4",
- "http://videos.jzvd.org/v/饺子不服.mp4"
+ "$server_name/v/饺子还年轻.mp4",
+ "$server_name/v/饺子主动.mp4",
+ "$server_name/v/饺子真萌.mp4",
+ "$server_name/v/饺子真会.mp4",
+ "$server_name/v/饺子运动.mp4",
+ "$server_name/v/饺子有活.mp4",
+ "$server_name/v/饺子星光.mp4",
+ "$server_name/v/饺子想听.mp4",
+ "$server_name/v/饺子想吹.mp4",
+ "$server_name/v/饺子汪汪.mp4",
+
+ "$server_name/v/饺子偷人.mp4",
+ "$server_name/v/饺子挺住.mp4",
+ "$server_name/v/饺子跳.mp4",
+ "$server_name/v/饺子受不了.mp4",
+ "$server_name/v/饺子三位.mp4",
+ "$server_name/v/饺子起飞.mp4",
+ "$server_name/v/饺子你听.mp4",
+ "$server_name/v/饺子可以了.mp4",
+ "$server_name/v/饺子可以.mp4",
+ "$server_name/v/饺子好妈妈.mp4",
+
+ "$server_name/v/饺子还小.mp4",
+ "$server_name/v/饺子高兴.mp4",
+ "$server_name/v/饺子高冷.mp4",
+ "$server_name/v/饺子堵住了.mp4",
+ "$server_name/v/饺子都懂.mp4",
+ "$server_name/v/饺子打电话.mp4",
+ "$server_name/v/饺子不服.mp4"
)
val thumbnails = arrayOf(
- "http://videos.jzvd.org/v/饺子还年轻.jpg",
- "http://videos.jzvd.org/v/饺子主动.jpg",
- "http://videos.jzvd.org/v/饺子真萌.jpg",
- "http://videos.jzvd.org/v/饺子真会.jpg",
- "http://videos.jzvd.org/v/饺子运动.jpg",
- "http://videos.jzvd.org/v/饺子有活.jpg",
- "http://videos.jzvd.org/v/饺子星光.jpg",
- "http://videos.jzvd.org/v/饺子想听.jpg",
- "http://videos.jzvd.org/v/饺子想吹.jpg",
- "http://videos.jzvd.org/v/饺子汪汪.jpg",
-
- "http://videos.jzvd.org/v/饺子偷人.jpg",
- "http://videos.jzvd.org/v/饺子挺住.jpg",
- "http://videos.jzvd.org/v/饺子跳.jpg",
- "http://videos.jzvd.org/v/饺子受不了.jpg",
- "http://videos.jzvd.org/v/饺子三位.jpg",
- "http://videos.jzvd.org/v/饺子起飞.jpg",
- "http://videos.jzvd.org/v/饺子你听.jpg",
- "http://videos.jzvd.org/v/饺子可以了.jpg",
- "http://videos.jzvd.org/v/饺子可以.jpg",
- "http://videos.jzvd.org/v/饺子好妈妈.jpg",
-
- "http://videos.jzvd.org/v/饺子还小.jpg",
- "http://videos.jzvd.org/v/饺子高兴.jpg",
- "http://videos.jzvd.org/v/饺子高冷.jpg",
- "http://videos.jzvd.org/v/饺子堵住了.jpg",
- "http://videos.jzvd.org/v/饺子都懂.jpg",
- "http://videos.jzvd.org/v/饺子打电话.jpg",
- "http://videos.jzvd.org/v/饺子不服.jpg"
+ "$server_name/v/饺子还年轻.jpg",
+ "$server_name/v/饺子主动.jpg",
+ "$server_name/v/饺子真萌.jpg",
+ "$server_name/v/饺子真会.jpg",
+ "$server_name/v/饺子运动.jpg",
+ "$server_name/v/饺子有活.jpg",
+ "$server_name/v/饺子星光.jpg",
+ "$server_name/v/饺子想听.jpg",
+ "$server_name/v/饺子想吹.jpg",
+ "$server_name/v/饺子汪汪.jpg",
+
+ "$server_name/v/饺子偷人.jpg",
+ "$server_name/v/饺子挺住.jpg",
+ "$server_name/v/饺子跳.jpg",
+ "$server_name/v/饺子受不了.jpg",
+ "$server_name/v/饺子三位.jpg",
+ "$server_name/v/饺子起飞.jpg",
+ "$server_name/v/饺子你听.jpg",
+ "$server_name/v/饺子可以了.jpg",
+ "$server_name/v/饺子可以.jpg",
+ "$server_name/v/饺子好妈妈.jpg",
+
+ "$server_name/v/饺子还小.jpg",
+ "$server_name/v/饺子高兴.jpg",
+ "$server_name/v/饺子高冷.jpg",
+ "$server_name/v/饺子堵住了.jpg",
+ "$server_name/v/饺子都懂.jpg",
+ "$server_name/v/饺子打电话.jpg",
+ "$server_name/v/饺子不服.jpg"
)
val titles = arrayOf(
diff --git a/demo/src/main/res/layout/fragment_api.xml b/demo/src/main/res/layout/fragment_base.xml
similarity index 78%
rename from demo/src/main/res/layout/fragment_api.xml
rename to demo/src/main/res/layout/fragment_base.xml
index 829d1d36..5350ded7 100644
--- a/demo/src/main/res/layout/fragment_api.xml
+++ b/demo/src/main/res/layout/fragment_base.xml
@@ -59,6 +59,24 @@
android:layout_marginBottom="8dp"
android:text="@string/screen_rotate" />
+
+
+
+
+
+
+
\ No newline at end of file
From 65b1b08f19e52f09139bf0f1ce614f9a55d41683 Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Sat, 26 Dec 2020 05:09:29 +0800
Subject: [PATCH 48/52] btn weight
---
demo/src/main/res/layout/fragment_base.xml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/demo/src/main/res/layout/fragment_base.xml b/demo/src/main/res/layout/fragment_base.xml
index 5350ded7..38bc6357 100644
--- a/demo/src/main/res/layout/fragment_base.xml
+++ b/demo/src/main/res/layout/fragment_base.xml
@@ -66,14 +66,16 @@
From 548760300ab00603d0bcbe5566e5705e1cbc7311 Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Sat, 26 Dec 2020 20:58:05 +0800
Subject: [PATCH 49/52] url width and height
---
.../CustomJzvd/MyJzvdStdNoTitleNoClarity.java | 3 +-
.../java/cn/jzvd/demo/Fragment_1_Base.java | 8 +-
.../tiktok/TikTokRecyclerViewAdapter.java | 8 +-
demo/src/main/java/org/jzvd/jzvideo/urls.kt | 81 ++++++++++---------
4 files changed, 54 insertions(+), 46 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStdNoTitleNoClarity.java b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStdNoTitleNoClarity.java
index 563af7b1..18b46db7 100644
--- a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStdNoTitleNoClarity.java
+++ b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStdNoTitleNoClarity.java
@@ -3,9 +3,10 @@
import android.content.Context;
import android.util.AttributeSet;
+import cn.jzvd.JzvdStd;
import cn.jzvd.demo.R;
-public class MyJzvdStdNoTitleNoClarity extends MyJzvdStd {
+public class MyJzvdStdNoTitleNoClarity extends JzvdStd {
public MyJzvdStdNoTitleNoClarity(Context context) {
super(context);
diff --git a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
index dc61b427..80adab8e 100644
--- a/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
+++ b/demo/src/main/java/cn/jzvd/demo/Fragment_1_Base.java
@@ -76,10 +76,10 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
LinkedHashMap map = new LinkedHashMap();
- String proxyUrl = ApplicationDemo.getProxy(getContext()).getProxyUrl(UrlsKt.getAliVideos()[0]);
+ String proxyUrl = ApplicationDemo.getProxy(getContext()).getProxyUrl(UrlsKt.getCndVideos()[0]);
map.put("高清", proxyUrl);
- map.put("标清", UrlsKt.getAliVideos()[1]);
- map.put("普清", UrlsKt.getAliVideos()[2]);
+ map.put("标清", UrlsKt.getCndVideos()[1]);
+ map.put("普清", UrlsKt.getCndVideos()[2]);
JZDataSource jzDataSource = new JZDataSource(map, "饺子起立");
jzDataSource.looping = true;
jzDataSource.currentUrlIndex = 2;
@@ -87,7 +87,7 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) {
mJzvdStd.setUp(jzDataSource
, JzvdStd.SCREEN_NORMAL);
Jzvd.PROGRESS_DRAG_RATE = 2f;//设置播放进度条手势滑动阻尼系数
- Glide.with(this).load(UrlsKt.getAliThumbnail()[0]).into(mJzvdStd.posterImageView);
+ Glide.with(this).load(UrlsKt.getCndThumbnail()[0]).into(mJzvdStd.posterImageView);
}
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/tiktok/TikTokRecyclerViewAdapter.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/tiktok/TikTokRecyclerViewAdapter.java
index f1ae9713..836ffe1e 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/tiktok/TikTokRecyclerViewAdapter.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/tiktok/TikTokRecyclerViewAdapter.java
@@ -21,7 +21,7 @@
public class TikTokRecyclerViewAdapter extends RecyclerView.Adapter {
public static final String TAG = "AdapterTikTokRecyclerView";
- int[] videoIndexs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+ int[] videoIndexs = {0, 1, 2, 3, 4, 5};
private Context context;
public TikTokRecyclerViewAdapter(Context context) {
@@ -41,11 +41,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(UrlsKt.getVl1()[position],
- UrlsKt.getTl1()[position]);
+ JZDataSource jzDataSource = new JZDataSource(UrlsKt.getVl3()[position],
+ UrlsKt.getTl3()[position]);
jzDataSource.looping = true;
holder.jzvdStd.setUp(jzDataSource, Jzvd.SCREEN_NORMAL);
- Glide.with(holder.jzvdStd.getContext()).load(UrlsKt.getPl1()[position]).into(holder.jzvdStd.posterImageView);
+ Glide.with(holder.jzvdStd.getContext()).load(UrlsKt.getPl3()[position]).into(holder.jzvdStd.posterImageView);
}
@Override
diff --git a/demo/src/main/java/org/jzvd/jzvideo/urls.kt b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
index fee2c82f..aa967ad7 100644
--- a/demo/src/main/java/org/jzvd/jzvideo/urls.kt
+++ b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
@@ -7,7 +7,7 @@ package org.jzvd.jzvideo
val cn = "http://8.136.101.204"
val us = "http://videos.jzvd.org"
-var server_name: String = cn;
+var server_name: String = cn
val ldjVideos = arrayOf(
@@ -58,7 +58,7 @@ val ldjVideos = arrayOf(
"$server_name/v/ldj/45-ldj.mp4"
)
-val aliVideos = arrayOf(
+val cndVideos = arrayOf(
"https://jzvd.nathen.cn/video/cfe6c30-1767b1bc21f-0007-1823-c86-de200.mp4",//三个不同分辨率
"https://jzvd.nathen.cn/0339d49439f947419576c33a0aa51545/79e1a938b0d2435d85bd964a77640506-f4e986e3e38ed3f473f7ba82bc07e188-ld.mp4",
"https://jzvd.nathen.cn/0339d49439f947419576c33a0aa51545/79e1a938b0d2435d85bd964a77640506-8924c7da92ebd789d315bc5de0a81059-fd.mp4",
@@ -68,7 +68,7 @@ val aliVideos = arrayOf(
"https://jzvd.nathen.cn/video/5a6465ff-1767b2a5e28-0007-1823-c86-de200.mp4"
)
-val aliThumbnail = arrayOf(
+val cndThumbnail = arrayOf(
"https://jzvd.nathen.cn/snapshot/0339d49439f947419576c33a0aa5154500005.jpg",
"",
"",
@@ -79,99 +79,104 @@ val aliThumbnail = arrayOf(
)
val videos = arrayOf(
- "$server_name/v/饺子还年轻.mp4",
+
+ //width > height
"$server_name/v/饺子主动.mp4",
- "$server_name/v/饺子真萌.mp4",
- "$server_name/v/饺子真会.mp4",
"$server_name/v/饺子运动.mp4",
"$server_name/v/饺子有活.mp4",
"$server_name/v/饺子星光.mp4",
- "$server_name/v/饺子想听.mp4",
"$server_name/v/饺子想吹.mp4",
"$server_name/v/饺子汪汪.mp4",
-
"$server_name/v/饺子偷人.mp4",
- "$server_name/v/饺子挺住.mp4",
"$server_name/v/饺子跳.mp4",
"$server_name/v/饺子受不了.mp4",
"$server_name/v/饺子三位.mp4",
"$server_name/v/饺子起飞.mp4",
"$server_name/v/饺子你听.mp4",
"$server_name/v/饺子可以了.mp4",
- "$server_name/v/饺子可以.mp4",
- "$server_name/v/饺子好妈妈.mp4",
-
"$server_name/v/饺子还小.mp4",
"$server_name/v/饺子高兴.mp4",
"$server_name/v/饺子高冷.mp4",
"$server_name/v/饺子堵住了.mp4",
"$server_name/v/饺子都懂.mp4",
"$server_name/v/饺子打电话.mp4",
- "$server_name/v/饺子不服.mp4"
-)
+ "$server_name/v/饺子不服.mp4",
+ //height > width
+ "$server_name/v/饺子还年轻.mp4",
+ "$server_name/v/饺子好妈妈.mp4",
+ "$server_name/v/饺子可以.mp4",
+ "$server_name/v/饺子挺住.mp4",
+ "$server_name/v/饺子想听.mp4",
+ "$server_name/v/饺子真会.mp4",
+ "$server_name/v/饺子真萌.mp4"
+
+ )
val thumbnails = arrayOf(
- "$server_name/v/饺子还年轻.jpg",
"$server_name/v/饺子主动.jpg",
- "$server_name/v/饺子真萌.jpg",
- "$server_name/v/饺子真会.jpg",
"$server_name/v/饺子运动.jpg",
"$server_name/v/饺子有活.jpg",
"$server_name/v/饺子星光.jpg",
- "$server_name/v/饺子想听.jpg",
"$server_name/v/饺子想吹.jpg",
"$server_name/v/饺子汪汪.jpg",
-
"$server_name/v/饺子偷人.jpg",
- "$server_name/v/饺子挺住.jpg",
"$server_name/v/饺子跳.jpg",
"$server_name/v/饺子受不了.jpg",
"$server_name/v/饺子三位.jpg",
"$server_name/v/饺子起飞.jpg",
"$server_name/v/饺子你听.jpg",
"$server_name/v/饺子可以了.jpg",
- "$server_name/v/饺子可以.jpg",
- "$server_name/v/饺子好妈妈.jpg",
-
"$server_name/v/饺子还小.jpg",
"$server_name/v/饺子高兴.jpg",
"$server_name/v/饺子高冷.jpg",
"$server_name/v/饺子堵住了.jpg",
"$server_name/v/饺子都懂.jpg",
"$server_name/v/饺子打电话.jpg",
- "$server_name/v/饺子不服.jpg"
+ "$server_name/v/饺子不服.jpg",
+
+ //height > width
+ "$server_name/v/饺子还年轻.jpg",
+ "$server_name/v/饺子好妈妈.jpg",
+ "$server_name/v/饺子可以.jpg",
+ "$server_name/v/饺子挺住.jpg",
+ "$server_name/v/饺子想听.jpg",
+ "$server_name/v/饺子真会.jpg",
+ "$server_name/v/饺子真萌.jpg"
+
)
val titles = arrayOf(
- "饺子还年轻",
+ //width > height
"饺子主动",
- "饺子真萌",
- "饺子真会",
"饺子运动",
"饺子有活",
"饺子星光",
- "饺子想听",
"饺子想吹",
"饺子汪汪",
-
"饺子偷人",
- "饺子挺住",
"饺子跳",
"饺子受不了",
"饺子三位",
+
"饺子起飞",
"饺子你听",
"饺子可以了",
- "饺子可以",
- "饺子好妈妈",
-
"饺子还小",
"饺子高兴",
"饺子高冷",
"饺子堵住了",
"饺子都懂",
"饺子打电话",
- "饺子不服"
+ "饺子不服",
+
+ //height > width
+ "饺子还年轻",
+ "饺子好妈妈",
+ "饺子可以",
+ "饺子挺住",
+ "饺子想听",
+ "饺子真会",
+ "饺子真萌"
)
val vl1 = videos.copyOfRange(3, 9)
@@ -182,9 +187,9 @@ val vl2 = videos.copyOfRange(10, 20)
val pl2 = thumbnails.copyOfRange(10, 20)
val tl2 = titles.copyOfRange(10, 20)
-val vl3 = videos.copyOfRange(20, 25)
-val pl3 = thumbnails.copyOfRange(20, 25)
-val tl3 = titles.copyOfRange(20, 25)
+val vl3 = videos.copyOfRange(20, 26)
+val pl3 = thumbnails.copyOfRange(20, 26)
+val tl3 = titles.copyOfRange(20, 26)
val vll = arrayOf(
@@ -201,3 +206,5 @@ val tll = arrayOf(
+
+
From fdc0f5645b6d08622ad3a82b9afe5f7bea1696cb Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Sat, 26 Dec 2020 21:32:47 +0800
Subject: [PATCH 50/52] fix bug
---
.../demo/Tab_3_List/ListView/NormalListViewActivity.java | 6 +++---
.../Tab_3_List/ListView/adapter/RecyclerViewAdapter.java | 2 +-
demo/src/main/java/org/jzvd/jzvideo/urls.kt | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/NormalListViewActivity.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/NormalListViewActivity.java
index 52aa05ee..afdb7c95 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/NormalListViewActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/NormalListViewActivity.java
@@ -37,9 +37,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
listView = findViewById(R.id.listview);
listView.setAdapter(new ListViewAdapter(this,
- UrlsKt.getVl3(),
- UrlsKt.getTl3(),
- UrlsKt.getPl3()));
+ UrlsKt.getVl2(),
+ UrlsKt.getTl2(),
+ UrlsKt.getPl2()));
listView.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
diff --git a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java
index 22a8bdf4..c8ee7c6e 100644
--- a/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java
+++ b/demo/src/main/java/cn/jzvd/demo/Tab_3_List/ListView/adapter/RecyclerViewAdapter.java
@@ -20,7 +20,7 @@
public class RecyclerViewAdapter extends RecyclerView.Adapter {
public static final String TAG = "AdapterRecyclerView";
- int[] videoIndexs = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+ int[] videoIndexs = {0, 1, 2, 3, 4, 5, 6, 7, 8};
private Context context;
public RecyclerViewAdapter(Context context) {
diff --git a/demo/src/main/java/org/jzvd/jzvideo/urls.kt b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
index aa967ad7..42deae5f 100644
--- a/demo/src/main/java/org/jzvd/jzvideo/urls.kt
+++ b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
@@ -179,9 +179,9 @@ val titles = arrayOf(
"饺子真萌"
)
-val vl1 = videos.copyOfRange(3, 9)
-val pl1 = thumbnails.copyOfRange(3, 9)
-val tl1 = titles.copyOfRange(3, 9)
+val vl1 = videos.copyOfRange(0, 9)
+val pl1 = thumbnails.copyOfRange(0, 9)
+val tl1 = titles.copyOfRange(0, 9)
val vl2 = videos.copyOfRange(10, 20)
val pl2 = thumbnails.copyOfRange(10, 20)
From 1a9e6328449c915ae32019dcda3ca2c53815bcc6 Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Sat, 26 Dec 2020 22:51:40 +0800
Subject: [PATCH 51/52] urls
---
demo/src/main/java/org/jzvd/jzvideo/urls.kt | 2 --
1 file changed, 2 deletions(-)
diff --git a/demo/src/main/java/org/jzvd/jzvideo/urls.kt b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
index 42deae5f..8ddfd2b4 100644
--- a/demo/src/main/java/org/jzvd/jzvideo/urls.kt
+++ b/demo/src/main/java/org/jzvd/jzvideo/urls.kt
@@ -9,7 +9,6 @@ val us = "http://videos.jzvd.org"
var server_name: String = cn
-
val ldjVideos = arrayOf(
"$server_name/v/ldj/01-ldj.mp4",
"$server_name/v/ldj/02-ldj.mp4",
@@ -79,7 +78,6 @@ val cndThumbnail = arrayOf(
)
val videos = arrayOf(
-
//width > height
"$server_name/v/饺子主动.mp4",
"$server_name/v/饺子运动.mp4",
From 83b2edf43e7f983eba6f0ad6de024a9d34c3fc22 Mon Sep 17 00:00:00 2001
From: lipangit <1066666651@qq.com>
Date: Sun, 27 Dec 2020 02:18:10 +0800
Subject: [PATCH 52/52] v7.6.0
---
README.md | 4 ++--
demo/build.gradle | 4 ++--
gradle/build_upload.gradle | 2 +-
library/build.gradle | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 03d8da76..e889ce34 100644
--- a/README.md
+++ b/README.md
@@ -2,13 +2,13 @@
[中文文档](http://jzvd.org)
-[下载Demo](https://github.com/Jzvd/JZVideo/releases/download/v7.5.0/jiaozivideoplayer-7.5.0.apk)
+[下载Demo](https://github.com/Jzvd/JZVideo/releases/download/v7.6.0/jiaozivideoplayer-7.6.0.apk)
## QuickStart
1.添加类库
```gradle
-implementation 'cn.jzvd:jiaozivideoplayer:7.5.0'
+implementation 'cn.jzvd:jiaozivideoplayer:7.6.0'
```
2.添加布局
diff --git a/demo/build.gradle b/demo/build.gradle
index ac021865..3694f612 100644
--- a/demo/build.gradle
+++ b/demo/build.gradle
@@ -9,8 +9,8 @@ android {
applicationId "cn.jzvd.demo"
minSdkVersion 16
targetSdkVersion 30
- versionCode 105
- versionName "7.5.0"
+ versionCode 106
+ versionName "7.6.0"
multiDexEnabled true
ndk {
// add support lib
diff --git a/gradle/build_upload.gradle b/gradle/build_upload.gradle
index 25d725e0..ec386c0b 100644
--- a/gradle/build_upload.gradle
+++ b/gradle/build_upload.gradle
@@ -8,7 +8,7 @@ signing {
group = "cn.jzvd"
archivesBaseName = "jiaozivideoplayer"
-version = "7.5.0"
+version = "7.6.0"
uploadArchives {
repositories {
diff --git a/library/build.gradle b/library/build.gradle
index ffc31e51..473f4bbc 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 30
- versionCode 105
- versionName "7.5.0"
+ versionCode 106
+ versionName "7.6.0"
}
compileOptions {