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
d05840be
Commit
d05840be
authored
Mar 18, 2021
by
Hanruisong
Browse files
feat: 更新到v3.15.0
1.添加字幕自适应功能
parent
0261dce1
Changes
636
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1942 additions
and
0 deletions
+1942
-0
Demo.apk
Demo.apk
+0
-0
HuodeSceneVideoDemo/.gitignore
HuodeSceneVideoDemo/.gitignore
+9
-0
HuodeSceneVideoDemo/app/.gitignore
HuodeSceneVideoDemo/app/.gitignore
+1
-0
HuodeSceneVideoDemo/app/build.gradle
HuodeSceneVideoDemo/app/build.gradle
+56
-0
HuodeSceneVideoDemo/app/objectbox-models/default.json
HuodeSceneVideoDemo/app/objectbox-models/default.json
+250
-0
HuodeSceneVideoDemo/app/proguard-rules.pro
HuodeSceneVideoDemo/app/proguard-rules.pro
+21
-0
HuodeSceneVideoDemo/app/src/androidTest/java/com/bokecc/vod/ExampleInstrumentedTest.java
...roidTest/java/com/bokecc/vod/ExampleInstrumentedTest.java
+26
-0
HuodeSceneVideoDemo/app/src/main/AndroidManifest.xml
HuodeSceneVideoDemo/app/src/main/AndroidManifest.xml
+81
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/AccountInfoActivity.java
...app/src/main/java/com/bokecc/vod/AccountInfoActivity.java
+61
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/ConfigUtil.java
...ideoDemo/app/src/main/java/com/bokecc/vod/ConfigUtil.java
+53
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/HuodeApplication.java
...mo/app/src/main/java/com/bokecc/vod/HuodeApplication.java
+99
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/MainActivity.java
...eoDemo/app/src/main/java/com/bokecc/vod/MainActivity.java
+316
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/DanmuColorAdapter.java
...c/main/java/com/bokecc/vod/adapter/DanmuColorAdapter.java
+81
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/DefinitionAdapter.java
...c/main/java/com/bokecc/vod/adapter/DefinitionAdapter.java
+67
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/DeviceAdapter.java
...p/src/main/java/com/bokecc/vod/adapter/DeviceAdapter.java
+64
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/DownloadViewAdapter.java
...main/java/com/bokecc/vod/adapter/DownloadViewAdapter.java
+117
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/DownloadedViewAdapter.java
...in/java/com/bokecc/vod/adapter/DownloadedViewAdapter.java
+86
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/ExerciseAdapter.java
...src/main/java/com/bokecc/vod/adapter/ExerciseAdapter.java
+336
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/ExerciseAnswerAdapter.java
...in/java/com/bokecc/vod/adapter/ExerciseAnswerAdapter.java
+130
-0
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/adapter/PlayListAdapter.java
...src/main/java/com/bokecc/vod/adapter/PlayListAdapter.java
+88
-0
No files found.
Demo.apk
0 → 100644
View file @
d05840be
File added
HuodeSceneVideoDemo/.gitignore
0 → 100644
View file @
d05840be
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
HuodeSceneVideoDemo/app/.gitignore
0 → 100644
View file @
d05840be
/build
HuodeSceneVideoDemo/app/build.gradle
0 → 100644
View file @
d05840be
apply
plugin:
'com.android.application'
apply
plugin:
'io.objectbox'
android
{
compileSdkVersion
29
defaultConfig
{
applicationId
"com.bokecc.vod"
minSdkVersion
17
targetSdkVersion
29
versionCode
1
versionName
"1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes
{
release
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android.txt'
),
'proguard-rules.pro'
}
}
//使用投屏功能时需要添加此配置
packagingOptions
{
exclude
'META-INF/LICENSE.txt'
exclude
'META-INF/beans.xml'
}
}
dependencies
{
implementation
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
//noinspection GradleCompatible
implementation
'com.android.support:appcompat-v7:28.0.0'
implementation
'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation
'junit:junit:4.12'
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'
//必须引用commonLib
implementation
'com.bokecc:commonLib:0.1.12'
//必须引用
implementation
'com.bokecc:drm:1.2.1'
//使用DWIjkMediaPlayer 倍速播放器引入
implementation
'com.bokecc:hdplayer:1.1.0_lite'
//上传视频时使用压缩功能时需要引用
implementation
'com.bokecc:compressvideo:1.0.0'
//使用Vr播放功能时需要引入
implementation
'com.bokecc:vrplay:1.0.0'
//使用投屏功能需要引用
implementation
'com.bokecc:projection:1.7.0'
//弹幕
implementation
'com.github.ctiao:DanmakuFlameMaster:0.9.25'
//noinspection GradleCompatible
implementation
'com.android.support:recyclerview-v7:28.0.0'
implementation
'com.github.bumptech.glide:glide:4.9.0'
implementation
'com.squareup.picasso:picasso:2.5.2'
}
HuodeSceneVideoDemo/app/objectbox-models/default.json
0 → 100644
View file @
d05840be
{
"_note1"
:
"KEEP THIS FILE! Check it into a version control system (VCS) like git."
,
"_note2"
:
"ObjectBox manages crucial IDs for your object model. See docs for details."
,
"_note3"
:
"If you have VCS merge conflicts, you must resolve them according to ObjectBox docs."
,
"entities"
:
[
{
"id"
:
"1:8768526305188734432"
,
"lastPropertyId"
:
"16:8075305095870498023"
,
"name"
:
"DownloadInfo"
,
"properties"
:
[
{
"id"
:
"1:8403337342647340025"
,
"name"
:
"id"
},
{
"id"
:
"2:6505193976292401154"
,
"name"
:
"videoId"
},
{
"id"
:
"3:1446677165725264065"
,
"name"
:
"title"
},
{
"id"
:
"4:4220842065152559105"
,
"name"
:
"format"
},
{
"id"
:
"5:7803872055355250992"
,
"name"
:
"downloadMode"
},
{
"id"
:
"6:9049288209764088931"
,
"name"
:
"videoCover"
},
{
"id"
:
"7:1936982348339523809"
,
"name"
:
"start"
},
{
"id"
:
"8:2904966229102648757"
,
"name"
:
"end"
},
{
"id"
:
"9:1962358382313393756"
,
"name"
:
"status"
},
{
"id"
:
"10:5492754050221785847"
,
"name"
:
"createTime"
},
{
"id"
:
"11:195409674161015319"
,
"name"
:
"definition"
},
{
"id"
:
"12:8638392584303409457"
,
"name"
:
"firstSubtitleStatus"
},
{
"id"
:
"13:6949084780448653041"
,
"name"
:
"secondSubtitleStatus"
},
{
"id"
:
"14:8385818052262541025"
,
"name"
:
"subtitleNum"
},
{
"id"
:
"15:7451937971450745534"
,
"name"
:
"logoPath"
},
{
"id"
:
"16:8075305095870498023"
,
"name"
:
"subtitleModel"
}
],
"relations"
:
[]
},
{
"id"
:
"2:6649355820352023138"
,
"lastPropertyId"
:
"32:5853698447561458034"
,
"name"
:
"UploadInfo"
,
"properties"
:
[
{
"id"
:
"1:8387880763741931373"
,
"name"
:
"id"
},
{
"id"
:
"2:5202281855456314070"
,
"name"
:
"uploadId"
},
{
"id"
:
"3:414852080882565225"
,
"name"
:
"start"
},
{
"id"
:
"4:4436394142827028956"
,
"name"
:
"end"
},
{
"id"
:
"5:9159809636479666823"
,
"name"
:
"status"
},
{
"id"
:
"6:8728392785962589693"
,
"name"
:
"progress"
},
{
"id"
:
"7:3926515601035295743"
,
"name"
:
"title"
},
{
"id"
:
"8:3472254776078907922"
,
"name"
:
"tag"
},
{
"id"
:
"9:4556251465110735478"
,
"name"
:
"desc"
},
{
"id"
:
"10:6462529601629422651"
,
"name"
:
"filePath"
},
{
"id"
:
"11:8766746511901802495"
,
"name"
:
"videoCoverPath"
},
{
"id"
:
"12:6610893761283564255"
,
"name"
:
"categoryId"
},
{
"id"
:
"13:7208079175202262527"
,
"name"
:
"uploadOrResume"
},
{
"id"
:
"14:4418901835854856049"
,
"name"
:
"videoId"
},
{
"id"
:
"15:6027799538921557682"
,
"name"
:
"server"
},
{
"id"
:
"16:1994206540371720144"
,
"name"
:
"servicetype"
},
{
"id"
:
"17:8835303554074081155"
,
"name"
:
"creationTime"
},
{
"id"
:
"18:1384995516766379914"
,
"name"
:
"priority"
},
{
"id"
:
"19:9030720320642459459"
,
"name"
:
"fileName"
},
{
"id"
:
"20:6862849274129351807"
,
"name"
:
"encodetype"
},
{
"id"
:
"21:1295764890849593971"
,
"name"
:
"md5"
},
{
"id"
:
"22:7676352544216585979"
,
"name"
:
"fileByteSize"
},
{
"id"
:
"23:3643475283016949792"
,
"name"
:
"isCrop"
},
{
"id"
:
"24:7807872492173303372"
,
"name"
:
"expectWidth"
},
{
"id"
:
"25:3417092904932790710"
,
"name"
:
"corner"
},
{
"id"
:
"26:8922674244185251216"
,
"name"
:
"offsetx"
},
{
"id"
:
"27:345385008092894003"
,
"name"
:
"offsety"
},
{
"id"
:
"28:570882708970630771"
,
"name"
:
"fontfamily"
},
{
"id"
:
"29:7241625263332694810"
,
"name"
:
"fontsize"
},
{
"id"
:
"30:5440028499858819373"
,
"name"
:
"fontcolor"
},
{
"id"
:
"31:2256770575453430808"
,
"name"
:
"fontalpha"
},
{
"id"
:
"32:5853698447561458034"
,
"name"
:
"text"
}
],
"relations"
:
[]
},
{
"id"
:
"3:2876455800580781639"
,
"lastPropertyId"
:
"4:5942944285330377468"
,
"name"
:
"VideoPosition"
,
"properties"
:
[
{
"id"
:
"1:1962738583933436905"
,
"name"
:
"id"
},
{
"id"
:
"2:3994122668329660665"
,
"name"
:
"videoId"
},
{
"id"
:
"3:5383099004811845369"
,
"name"
:
"position"
},
{
"id"
:
"4:5942944285330377468"
,
"name"
:
"isPlayCompleted"
}
],
"relations"
:
[]
}
],
"lastEntityId"
:
"3:2876455800580781639"
,
"lastIndexId"
:
"0:0"
,
"lastRelationId"
:
"0:0"
,
"lastSequenceId"
:
"0:0"
,
"modelVersion"
:
4
,
"modelVersionParserMinimum"
:
4
,
"retiredEntityUids"
:
[],
"retiredIndexUids"
:
[],
"retiredPropertyUids"
:
[],
"retiredRelationUids"
:
[],
"version"
:
1
}
\ No newline at end of file
HuodeSceneVideoDemo/app/proguard-rules.pro
0 → 100644
View file @
d05840be
# Add project specific ProGuard rules here.
#
You
can
control
the
set
of
applied
configuration
files
using
the
#
proguardFiles
setting
in
build
.
gradle
.
#
#
For
more
details
,
see
#
http
://
developer
.
android
.
com
/
guide
/
developing
/
tools
/
proguard
.
html
#
If
your
project
uses
WebView
with
JS
,
uncomment
the
following
#
and
specify
the
fully
qualified
class
name
to
the
JavaScript
interface
#
class
:
#-
keepclassmembers
class
fqcn
.
of
.
javascript
.
interface
.
for
.
webview
{
#
public
*
;
#
}
#
Uncomment
this
to
preserve
the
line
number
information
for
#
debugging
stack
traces
.
#-
keepattributes
SourceFile
,
LineNumberTable
#
If
you
keep
the
line
number
information
,
uncomment
this
to
#
hide
the
original
source
file
name
.
#-
renamesourcefileattribute
SourceFile
HuodeSceneVideoDemo/app/src/androidTest/java/com/bokecc/vod/ExampleInstrumentedTest.java
0 → 100644
View file @
d05840be
package
com.bokecc.vod
;
import
android.content.Context
;
import
android.support.test.InstrumentationRegistry
;
import
android.support.test.runner.AndroidJUnit4
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
static
org
.
junit
.
Assert
.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith
(
AndroidJUnit4
.
class
)
public
class
ExampleInstrumentedTest
{
@Test
public
void
useAppContext
()
{
// Context of the app under test.
Context
appContext
=
InstrumentationRegistry
.
getTargetContext
();
assertEquals
(
"com.bokecc.vod"
,
appContext
.
getPackageName
());
}
}
HuodeSceneVideoDemo/app/src/main/AndroidManifest.xml
0 → 100644
View file @
d05840be
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.bokecc.vod"
>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.CHANGE_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WAKE_LOCK"
/>
<uses-permission
android:name=
"android.permission.CHANGE_WIFI_MULTICAST_STATE"
/>
<uses-permission
android:name=
"android.permission.VIBRATE"
/>
<application
android:name=
".HuodeApplication"
android:allowBackup=
"true"
android:icon=
"@mipmap/ic_launcher"
android:label=
"@string/app_name"
android:supportsRtl=
"true"
android:theme=
"@style/Theme.AppCompat.DayNight.NoActionBar"
android:usesCleartextTraffic=
"true"
android:requestLegacyExternalStorage=
"true"
>
<activity
android:name=
".MainActivity"
android:screenOrientation=
"portrait"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity
android:name=
".play.SpeedPlayActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout"
android:screenOrientation=
"portrait"
android:windowSoftInputMode=
"adjustPan|stateHidden|adjustResize"
android:supportsPictureInPicture=
"true"
/>
<activity
android:name=
".play.MediaPlayActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout"
android:screenOrientation=
"portrait"
android:windowSoftInputMode=
"adjustPan|stateHidden|adjustResize"
android:supportsPictureInPicture=
"true"
/>
<activity
android:name=
".play.VrPlayActivity"
android:configChanges=
"orientation|keyboardHidden|screenSize"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".AccountInfoActivity"
android:screenOrientation=
"portrait"
/>
<service
android:name=
".download.DownloadService"
/>
<activity
android:name=
".download.DownloadListActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".upload.UploadManageActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".upload.EditVideoInfoActivity"
android:screenOrientation=
"portrait"
/>
<service
android:name=
".upload.UploadService"
/>
<!--使用投屏功能时需要配置ProjectionUpnpService-->
<service
android:name=
"com.bokecc.projection.ProjectionUpnpService"
android:exported=
"false"
/>
<!--使用投屏功能时需要配置ProjectionSystemService-->
<service
android:name=
"com.bokecc.projection.ProjectionSystemService"
android:exported=
"false"
/>
</application>
</manifest>
\ No newline at end of file
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/AccountInfoActivity.java
0 → 100644
View file @
d05840be
package
com.bokecc.vod
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
android.support.v7.app.AppCompatActivity
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.bokecc.vod.utils.MultiUtils
;
public
class
AccountInfoActivity
extends
AppCompatActivity
{
private
Activity
activity
;
private
TextView
tv_user_id
,
tv_api_key
;
private
EditText
et_verification_code
;
private
ImageView
iv_back
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_account_info
);
MultiUtils
.
setStatusBarColor
(
this
,
R
.
color
.
transparent
,
true
);
activity
=
this
;
initView
();
}
private
void
initView
()
{
tv_user_id
=
findViewById
(
R
.
id
.
tv_user_id
);
tv_api_key
=
findViewById
(
R
.
id
.
tv_api_key
);
et_verification_code
=
findViewById
(
R
.
id
.
et_verification_code
);
iv_back
=
findViewById
(
R
.
id
.
iv_back
);
if
(!
TextUtils
.
isEmpty
(
MultiUtils
.
getVerificationCode
()))
{
et_verification_code
.
setText
(
MultiUtils
.
getVerificationCode
());
}
tv_user_id
.
setText
(
ConfigUtil
.
USER_ID
);
tv_api_key
.
setText
(
ConfigUtil
.
API_KEY
);
iv_back
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
finish
();
}
});
}
@Override
protected
void
onDestroy
()
{
super
.
onDestroy
();
String
code
=
et_verification_code
.
getText
().
toString
().
trim
();
MultiUtils
.
setVerificationCode
(
code
);
}
}
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/ConfigUtil.java
0 → 100644
View file @
d05840be
package
com.bokecc.vod
;
/**
* ConfigUtil
*
* @author xxx
*/
public
class
ConfigUtil
{
/**
* 账号ID 可以替换为自己的USER_ID
*/
public
static
final
String
USER_ID
=
"391E6E3340A00767"
;
/**
* 可以替换为自己的API_KEY
*/
public
static
final
String
API_KEY
=
"T8WdOUuvFEiOsou1xjDr4U73v12M7iNa"
;
/**
* 获取视频信息的地址
*/
public
final
static
String
DATA_URL
=
"https://p.bokecc.com/demo/videoinfo.json"
;
/**
* 配置下载文件路径
*/
public
final
static
String
DOWNLOAD_PATH
=
"HuodeDownload"
;
/**
* 下载重试次数
*/
public
final
static
int
DOWNLOAD_RECONNECT_LIMIT
=
60
;
/**
* 配置同时下载个数
*/
public
final
static
int
DOWNLOADING_MAX
=
2
;
/**
* 配置同时上传个数
*/
public
final
static
int
UPLOADING_MAX
=
2
;
public
final
static
int
DOWNLOAD_FRAGMENT_MAX_TAB_SIZE
=
2
;
public
final
static
String
ACTION_UPLOAD
=
"video.upload"
;
/**
* 配置视频回调地址
*/
public
final
static
String
NOTIFY_URL
=
"http://www.example.com"
;
}
HuodeSceneVideoDemo/app/src/main/java/com/bokecc/vod/HuodeApplication.java
0 → 100644
View file @
d05840be
package
com.bokecc.vod
;
import
android.app.Application
;
import
android.content.Context
;
import
android.content.SharedPreferences
;
import
android.widget.Toast
;
import
com.bokecc.sdk.mobile.download.VodDownloadManager
;
import
com.bokecc.sdk.mobile.drm.DRMServer
;
import
com.bokecc.sdk.mobile.util.DWSdkStorage
;
import
com.bokecc.sdk.mobile.util.DWStorageUtil
;
import
com.bokecc.vod.data.ObjectBox
;
import
com.bokecc.vod.utils.MultiUtils
;
public
class
HuodeApplication
extends
Application
{
private
static
DRMServer
drmServer
;
public
static
Context
context
;