Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CCVideo
VOD_Android_SDK
Commits
e15654b1
Commit
e15654b1
authored
Apr 13, 2021
by
Han Ruisong
Browse files
feat: 更新到v3.15.1
增加离线跑马灯功能
parent
d05840be
Changes
159
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
257 additions
and
259 deletions
+257
-259
Demo.apk
Demo.apk
+0
-0
HuodeSceneVideoDemo/app/build.gradle
HuodeSceneVideoDemo/app/build.gradle
+1
-1
HuodeSceneVideoDemo/app/objectbox-models/default.json
HuodeSceneVideoDemo/app/objectbox-models/default.json
+63
-59
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/ConfigUtil.java
...ideoDemo/app/src/main/java/com/bokecc/vod/ConfigUtil.java
+4
-1
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/MainActivity.java
...eoDemo/app/src/main/java/com/bokecc/vod/MainActivity.java
+8
-11
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/DanmuColorAdapter.java
...c/main/java/com/bokecc/vod/adapter/DanmuColorAdapter.java
+1
-1
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/ExerciseAdapter.java
...src/main/java/com/bokecc/vod/adapter/ExerciseAdapter.java
+0
-1
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/PlayVideoAdapter.java
...rc/main/java/com/bokecc/vod/adapter/PlayVideoAdapter.java
+0
-1
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/UploadingAdapter.java
...rc/main/java/com/bokecc/vod/adapter/UploadingAdapter.java
+0
-2
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/data/DataSet.java
...eoDemo/app/src/main/java/com/bokecc/vod/data/DataSet.java
+0
-2
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/data/DataUtil.java
...oDemo/app/src/main/java/com/bokecc/vod/data/DataUtil.java
+2
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/data/DownloadInfo.java
...o/app/src/main/java/com/bokecc/vod/data/DownloadInfo.java
+170
-160
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/data/UploadInfo.java
...emo/app/src/main/java/com/bokecc/vod/data/UploadInfo.java
+0
-4
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/download/DownloadListActivity.java
...in/java/com/bokecc/vod/download/DownloadListActivity.java
+2
-5
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/download/DownloadService.java
...rc/main/java/com/bokecc/vod/download/DownloadService.java
+1
-1
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/download/DownloadedFragment.java
...main/java/com/bokecc/vod/download/DownloadedFragment.java
+2
-5
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/download/DownloadingFragment.java
...ain/java/com/bokecc/vod/download/DownloadingFragment.java
+0
-2
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/inter/ExercisesContinuePlay.java
...main/java/com/bokecc/vod/inter/ExercisesContinuePlay.java
+1
-1
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/inter/SelectDefinition.java
.../src/main/java/com/bokecc/vod/inter/SelectDefinition.java
+1
-1
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/inter/SelectVideo.java
...o/app/src/main/java/com/bokecc/vod/inter/SelectVideo.java
+1
-1
No files found.
Demo.apk
deleted
100644 → 0
View file @
d05840be
File deleted
HuodeSceneVideoDemo/app/build.gradle
View file @
e15654b1
...
...
@@ -33,7 +33,7 @@ dependencies {
androidTestImplementation
'com.android.support.test:runner:1.0.2'
androidTestImplementation
'com.android.support.test.espresso:espresso-core:3.0.2'
//获得场景视频SDK,必须引入
implementation
'com.bokecc:CCVOD:3.15.
0
'
implementation
'com.bokecc:CCVOD:3.15.
1
'
//必须引用commonLib
implementation
'com.bokecc:commonLib:0.1.12'
//必须引用
...
...
HuodeSceneVideoDemo/app/objectbox-models/default.json
View file @
e15654b1
...
...
@@ -4,239 +4,243 @@
"_note3"
:
"If you have VCS merge conflicts, you must resolve them according to ObjectBox docs."
,
"entities"
:
[
{
"id"
:
"1:8
768526305188734432
"
,
"lastPropertyId"
:
"1
6:8075305095870498023
"
,
"id"
:
"1:8
105040308776709834
"
,
"lastPropertyId"
:
"1
7:5808093742337430291
"
,
"name"
:
"DownloadInfo"
,
"properties"
:
[
{
"id"
:
"1:8
4
03
33
73
4
26
47340025
"
,
"id"
:
"1:803
9
73
3
26
7221120719
"
,
"name"
:
"id"
},
{
"id"
:
"2:
65
05
1
93
9762924
011
54
"
,
"id"
:
"2:
4
0593
54602378719
011"
,
"name"
:
"videoId"
},
{
"id"
:
"3:
1446677165725264065
"
,
"id"
:
"3:
2651063049410234003
"
,
"name"
:
"title"
},
{
"id"
:
"4:
4220842065152559105
"
,
"id"
:
"4:
8431285169701121777
"
,
"name"
:
"format"
},
{
"id"
:
"5:
7803872055355250992
"
,
"id"
:
"5:
8436349111347164380
"
,
"name"
:
"downloadMode"
},
{
"id"
:
"6:
9049288209764088931
"
,
"id"
:
"6:
3921987217561314349
"
,
"name"
:
"videoCover"
},
{
"id"
:
"7:
1936982348339523809
"
,
"id"
:
"7:
7759657121101185484
"
,
"name"
:
"start"
},
{
"id"
:
"8:
2904966229102648757
"
,
"id"
:
"8:
7937518604644987101
"
,
"name"
:
"end"
},
{
"id"
:
"9:
196235838231339375
6"
,
"id"
:
"9:
771892953284402227
6"
,
"name"
:
"status"
},
{
"id"
:
"10:
5492754050221785847
"
,
"id"
:
"10:
6926072102982124274
"
,
"name"
:
"createTime"
},
{
"id"
:
"11:
195409674161015319
"
,
"id"
:
"11:
4604355265909281248
"
,
"name"
:
"definition"
},
{
"id"
:
"12:
8638392
584
3
034
09457
"
,
"id"
:
"12:
645
584034
8889094151
"
,
"name"
:
"firstSubtitleStatus"
},
{
"id"
:
"13:
6949084780448653041
"
,
"id"
:
"13:
1167022977712328498
"
,
"name"
:
"secondSubtitleStatus"
},
{
"id"
:
"14:
8385818052262541
02
5
"
,
"id"
:
"14:
42651652613064400
02"
,
"name"
:
"subtitleNum"
},
{
"id"
:
"15:
7451937971450745534
"
,
"id"
:
"15:
5284581815255197125
"
,
"name"
:
"logoPath"
},
{
"id"
:
"16:
8075305095870498023
"
,
"id"
:
"16:
5133081747593224541
"
,
"name"
:
"subtitleModel"
},
{
"id"
:
"17:5808093742337430291"
,
"name"
:
"marqueeData"
}
],
"relations"
:
[]
},
{
"id"
:
"2:
664935582035202313
8"
,
"lastPropertyId"
:
"32:
585369844756145803
4"
,
"id"
:
"2:
521971901771062256
8"
,
"lastPropertyId"
:
"32:
37655913571579606
4"
,
"name"
:
"UploadInfo"
,
"properties"
:
[
{
"id"
:
"1:
838788076374193137
3"
,
"id"
:
"1:
25509751622858054
3"
,
"name"
:
"id"
},
{
"id"
:
"2:
5202281855456314070
"
,
"id"
:
"2:
4862782265438399254
"
,
"name"
:
"uploadId"
},
{
"id"
:
"3:
414852080882565225
"
,
"id"
:
"3:
9184514539294307358
"
,
"name"
:
"start"
},
{
"id"
:
"4:44
36394142827028956
"
,
"id"
:
"4:44
07893841341240535
"
,
"name"
:
"end"
},
{
"id"
:
"5:
9159809636479666823
"
,
"id"
:
"5:
6834705732509632258
"
,
"name"
:
"status"
},
{
"id"
:
"6:
8728392785962589693
"
,
"id"
:
"6:
3755293600480825639
"
,
"name"
:
"progress"
},
{
"id"
:
"7:
3926515601035295743
"
,
"id"
:
"7:
8014970106600024445
"
,
"name"
:
"title"
},
{
"id"
:
"8:
3472254776078907922
"
,
"id"
:
"8:
211801046912231571
"
,
"name"
:
"tag"
},
{
"id"
:
"9:
4556251465110735478
"
,
"id"
:
"9:
3805718908445419296
"
,
"name"
:
"desc"
},
{
"id"
:
"10:
6462529601629422651
"
,
"id"
:
"10:
1195929207222222204
"
,
"name"
:
"filePath"
},
{
"id"
:
"11:
8766746511901802495
"
,
"id"
:
"11:
3854292479791803570
"
,
"name"
:
"videoCoverPath"
},
{
"id"
:
"12:
6610893761283564255
"
,
"id"
:
"12:
2948601501048763826
"
,
"name"
:
"categoryId"
},
{
"id"
:
"13:
7208079175202262527
"
,
"id"
:
"13:
6493975000001073703
"
,
"name"
:
"uploadOrResume"
},
{
"id"
:
"14:
4418901835854856049
"
,
"id"
:
"14:
9123508158748615788
"
,
"name"
:
"videoId"
},
{
"id"
:
"15:
6027799538921557682
"
,
"id"
:
"15:
7130366175908225544
"
,
"name"
:
"server"
},
{
"id"
:
"16:
1994206540371720144
"
,
"id"
:
"16:
353062928571240072
"
,
"name"
:
"servicetype"
},
{
"id"
:
"17:
8835303554074081155
"
,
"id"
:
"17:
5177451697264586973
"
,
"name"
:
"creationTime"
},
{
"id"
:
"18:13
84995516766379914
"
,
"id"
:
"18:13
6388475175600880
"
,
"name"
:
"priority"
},
{
"id"
:
"19:
9030720320642459459
"
,
"id"
:
"19:
6747895821541271233
"
,
"name"
:
"fileName"
},
{
"id"
:
"20:
6862849274129351807
"
,
"id"
:
"20:
3527353752901215004
"
,
"name"
:
"encodetype"
},
{
"id"
:
"21:
1295764890849593971
"
,
"id"
:
"21:
4156765761969146925
"
,
"name"
:
"md5"
},
{
"id"
:
"22:
7676352544216585979
"
,
"id"
:
"22:
3931966140914644823
"
,
"name"
:
"fileByteSize"
},
{
"id"
:
"23:
3643475283016949792
"
,
"id"
:
"23:
465646228868534846
"
,
"name"
:
"isCrop"
},
{
"id"
:
"24:
7807872492173303372
"
,
"id"
:
"24:
1603251036511352797
"
,
"name"
:
"expectWidth"
},
{
"id"
:
"25:
3417092904932790710
"
,
"id"
:
"25:
7900344661796872603
"
,
"name"
:
"corner"
},
{
"id"
:
"26:
8922674244185251216
"
,
"id"
:
"26:
5389773560117934299
"
,
"name"
:
"offsetx"
},
{
"id"
:
"27:
345385008092894003
"
,
"id"
:
"27:
5635259923654136266
"
,
"name"
:
"offsety"
},
{
"id"
:
"28:
570882708970630771
"
,
"id"
:
"28:
6127743617446753140
"
,
"name"
:
"fontfamily"
},
{
"id"
:
"29:
7241625263332694810
"
,
"id"
:
"29:
3303482383130782347
"
,
"name"
:
"fontsize"
},
{
"id"
:
"30:
5440028499858819373
"
,
"id"
:
"30:
7815379264503091829
"
,
"name"
:
"fontcolor"
},
{
"id"
:
"31:2
256770575453430808
"
,
"id"
:
"31:2
777526072822071055
"
,
"name"
:
"fontalpha"
},
{
"id"
:
"32:
585369844756145803
4"
,
"id"
:
"32:
37655913571579606
4"
,
"name"
:
"text"
}
],
"relations"
:
[]
},
{
"id"
:
"3:
2876455800580781639
"
,
"lastPropertyId"
:
"4:
5942944285330377468
"
,
"id"
:
"3:
1932175777996060843
"
,
"lastPropertyId"
:
"4:
6729974564801104336
"
,
"name"
:
"VideoPosition"
,
"properties"
:
[
{
"id"
:
"1:
1962738583933436905
"
,
"id"
:
"1:
5779509710981130260
"
,
"name"
:
"id"
},
{
"id"
:
"2:
3994122668329660665
"
,
"id"
:
"2:
566034591307766224
"
,
"name"
:
"videoId"
},
{
"id"
:
"3:
5383099004811845369
"
,
"id"
:
"3:
7264609046101814386
"
,
"name"
:
"position"
},
{
"id"
:
"4:
5942944285330377468
"
,
"id"
:
"4:
6729974564801104336
"
,
"name"
:
"isPlayCompleted"
}
],
"relations"
:
[]
}
],
"lastEntityId"
:
"3:
2876455800580781639
"
,
"lastEntityId"
:
"3:
1932175777996060843
"
,
"lastIndexId"
:
"0:0"
,
"lastRelationId"
:
"0:0"
,
"lastSequenceId"
:
"0:0"
,
...
...
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/ConfigUtil.java
View file @
e15654b1
...
...
@@ -8,13 +8,16 @@ package com.bokecc.vod;
public
class
ConfigUtil
{
/**
* 账号ID 可以替换为自己的USER_ID
*
*/
public
static
final
String
USER_ID
=
"391E6E3340A00767"
;
/**
* 可以替换为自己的API_KEY
*
*/
public
static
final
String
API_KEY
=
"T8WdOUuvFEiOsou1xjDr4U73v12M7iNa"
;
/**
* 获取视频信息的地址
*/
...
...
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/MainActivity.java
View file @
e15654b1
...
...
@@ -17,10 +17,6 @@ import android.widget.Button;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
com.bokecc.sdk.mobile.download.DownloadOperator
;
import
com.bokecc.sdk.mobile.download.VodDownloadBean
;
import
com.bokecc.sdk.mobile.download.VodDownloadManager
;
import
com.bokecc.sdk.mobile.util.HttpUtil
;
import
com.bokecc.vod.adapter.PlayVideoAdapter
;
import
com.bokecc.vod.data.DataSet
;
import
com.bokecc.vod.data.DataUtil
;
...
...
@@ -117,7 +113,7 @@ public class MainActivity extends AppCompatActivity {
gv_video_list
.
addHeaderView
(
headView
);
videoDatas
=
new
ArrayList
<>();
//
TODO for test
配置自己的视频时取消这行注释
//配置自己的视频时取消这行注释
// videoDatas = DataUtil.getVideoList();
playVideoAdapter
=
new
PlayVideoAdapter
(
MainActivity
.
this
,
videoDatas
);
...
...
@@ -217,12 +213,13 @@ public class MainActivity extends AppCompatActivity {
private
void
initData
()
{
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
()
{
request
();
}
}).
start
();
videoDatas
=
DataUtil
.
getVideoList
();
// new Thread(new Runnable() {
// @Override
// public void run() {
// request();
// }
// }).start();
}
private
void
request
()
{
...
...
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/DanmuColorAdapter.java
View file @
e15654b1
...
...
@@ -16,7 +16,7 @@ public class DanmuColorAdapter extends RecyclerView.Adapter<DanmuColorAdapter.Vi
private
List
<
DanmuColorInfo
>
mData
;
private
boolean
isPortrait
=
false
;
private
DanmuColorAdapter
.
OnItemClickListener
onItemClickListener
;
private
OnItemClickListener
onItemClickListener
;
public
DanmuColorAdapter
(
List
<
DanmuColorInfo
>
mData
,
boolean
isPortrait
)
{
this
.
mData
=
mData
;
...
...
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/ExerciseAdapter.java
View file @
e15654b1
...
...
@@ -14,7 +14,6 @@ import android.widget.LinearLayout;
import
android.widget.ScrollView
;
import
android.widget.TextView
;
import
com.bokecc.sdk.mobile.util.HttpUtil
;
import
com.bokecc.vod.R
;
import
com.bokecc.vod.data.ExeQuestion
;
import
com.bokecc.vod.data.ExerciseAnswer
;
...
...
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/PlayVideoAdapter.java
View file @
e15654b1
package
com.bokecc.vod.adapter
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/UploadingAdapter.java
View file @
e15654b1
package
com.bokecc.vod.adapter
;
import
android.content.Context
;
import
android.graphics.Bitmap
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -16,7 +15,6 @@ import com.bokecc.vod.R;
import
com.bokecc.vod.upload.UploadWrapper
;
import
com.bokecc.vod.utils.MultiUtils
;
import
java.io.File
;
import
java.util.List
;
public
class
UploadingAdapter
extends
BaseAdapter
{
...
...
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/data/DataSet.java
View file @
e15654b1
package
com.bokecc.vod.data
;
import
android.util.Log
;
import
java.util.List
;
import
io.objectbox.BoxStore
;
...
...
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/data/DataUtil.java
View file @
e15654b1
...
...
@@ -11,8 +11,10 @@ public class DataUtil {
/**
* 配置自己的视频ID
*/
static
String
[]
videoIds
=
new
String
[]{};
public
static
ArrayList
<
HuodeVideoInfo
>
getVideoList
()
{
ArrayList
<
HuodeVideoInfo
>
data
=
new
ArrayList
<>();
for
(
String
videoId
:
videoIds
)
{
...
...
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/data/DownloadInfo.java
View file @
e15654b1
...
...
@@ -8,43 +8,45 @@ import io.objectbox.annotation.Id;
@Entity
public
class
DownloadInfo
{
@Id
private
long
id
;
@Id
private
long
id
;
private
String
videoId
;
private
String
videoId
;
private
String
title
;
private
String
title
;
private
String
format
;
private
String
format
;
private
int
downloadMode
;
private
int
downloadMode
;
private
String
videoCover
;
private
String
videoCover
;
private
long
start
;
private
long
start
;
private
long
end
;
private
long
end
;
private
int
status
;
private
int
status
;
private
Date
createTime
;
private
Date
createTime
;
private
int
definition
;
private
int
definition
;
private
int
firstSubtitleStatus
;
private
int
firstSubtitleStatus
;
private
int
secondSubtitleStatus
;
private
int
secondSubtitleStatus
;
private
int
subtitleNum
;
private
int
subtitleNum
;
private
String
logoPath
;
private
String
logoPath
;
private
int
subtitleModel
;
private
int
subtitleModel
;
private
String
marqueeData
;
public
DownloadInfo
()
{
}
public
DownloadInfo
()
{
}
// public DownloadInfo(String videoId, String title, int status, long start, long end, Date createTime) {
// this.videoId = videoId;
...
...
@@ -61,146 +63,154 @@ public class DownloadInfo {
// this.definition = definition;
// }
public
DownloadInfo
(
String
videoId
,
String
title
,
int
status
,
long
start
,
long
end
,
Date
createTime
,
int
definition
,
int
subtitleModel
)
{
public
DownloadInfo
(
String
videoId
,
String
title
,
int
status
,
long
start
,
long
end
,
Date
createTime
,
int
definition
,
int
subtitleModel
)
{
// this(videoId, title, status, start, end, createTime);
this
.
videoId
=
videoId
;
this
.
title
=
title
;
this
.
status
=
status
;
this
.
createTime
=
createTime
;
this
.
definition
=
-
1
;
this
.
start
=
start
;
this
.
end
=
end
;
this
.
definition
=
definition
;
this
.
subtitleModel
=
subtitleModel
;
}
public
long
getId
()
{
return
id
;
}
public
void
setId
(
long
id
)
{
this
.
id
=
id
;
}
public
String
getVideoId
()
{
return
videoId
;
}
public
void
setVideoId
(
String
videoId
)
{
this
.
videoId
=
videoId
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
int
getDefinition
()
{
return
definition
;
}
public
void
setDefinition
(
int
definition
)
{
this
.
definition
=
definition
;
}
public
long
getStart
()
{
return
start
;
}
public
DownloadInfo
setStart
(
long
start
)
{
this
.
start
=
start
;
return
this
;
}
public
long
getEnd
()
{
return
end
;
}
public
DownloadInfo
setEnd
(
long
end
)
{
this
.
end
=
end
;
return
this
;