Commit 17711e83 authored by zhangww's avatar zhangww
Browse files

3.15.3

1.添加视频自定义封面功能
2.添加自动播放功能
3.因JCenter停止服务,替换依赖maven
4.更新相关文档说明
5.更新错误码说明
parent e15654b1
......@@ -12,12 +12,18 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//使用投屏功能时需要添加此配置
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/beans.xml'
......@@ -33,24 +39,23 @@ 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.1'
//必须引用commonLib
implementation 'com.bokecc:commonLib:0.1.12'
//必须引用
implementation 'com.bokecc:CCVOD:3.15.3'
//播放加密视频必须引用drm
implementation 'com.bokecc:drm:1.2.1'
//使用DWIjkMediaPlayer 倍速播放器引入
implementation 'com.bokecc:hdplayer:1.1.0_lite'
// implementation 'com.bokecc:speedplay:2.19.0'
//上传视频时使用压缩功能时需要引用
implementation 'com.bokecc:compressvideo:1.0.0'
//使用Vr播放功能时需要引入
implementation 'com.bokecc:vrplay:1.0.0'
implementation 'com.bokecc:CompressVideoLib:1.0.0'
//使用投屏功能需要引用
implementation 'com.bokecc:projection:1.7.0'
implementation 'com.bokecc:ProjectionLib:1.7.0'
//使用Vr播放功能时需要引入
implementation 'com.bokecc:VrPlayLib:1.0.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'
//noinspection GradleCompatible
implementation 'com.android.support:recyclerview-v7:28.0.0'
}
......@@ -4,243 +4,243 @@
"_note3": "If you have VCS merge conflicts, you must resolve them according to ObjectBox docs.",
"entities": [
{
"id": "1:8105040308776709834",
"lastPropertyId": "17:5808093742337430291",
"id": "1:6060025343066017223",
"lastPropertyId": "17:3816992718513438077",
"name": "DownloadInfo",
"properties": [
{
"id": "1:8039733267221120719",
"id": "1:1622790721163314640",
"name": "id"
},
{
"id": "2:4059354602378719011",
"id": "2:1221438837839809883",
"name": "videoId"
},
{
"id": "3:2651063049410234003",
"id": "3:8235839717438666153",
"name": "title"
},
{
"id": "4:8431285169701121777",
"id": "4:8933925283326357468",
"name": "format"
},
{
"id": "5:8436349111347164380",
"id": "5:7870869957414156305",
"name": "downloadMode"
},
{
"id": "6:3921987217561314349",
"id": "6:2530283063349600920",
"name": "videoCover"
},
{
"id": "7:7759657121101185484",
"id": "7:8317226133113895097",
"name": "start"
},
{
"id": "8:7937518604644987101",
"id": "8:2384878916516863740",
"name": "end"
},
{
"id": "9:7718929532844022276",
"id": "9:3867130596160747034",
"name": "status"
},
{
"id": "10:6926072102982124274",
"id": "10:2900859768800932206",
"name": "createTime"
},
{
"id": "11:4604355265909281248",
"id": "11:2172507572825499365",
"name": "definition"
},
{
"id": "12:6455840348889094151",
"id": "12:6115575365879959584",
"name": "firstSubtitleStatus"
},
{
"id": "13:1167022977712328498",
"id": "13:860472885623208613",
"name": "secondSubtitleStatus"
},
{
"id": "14:4265165261306440002",
"id": "14:7190289340737822726",
"name": "subtitleNum"
},
{
"id": "15:5284581815255197125",
"id": "15:3961278680497059877",
"name": "logoPath"
},
{
"id": "16:5133081747593224541",
"id": "16:3224378872150319382",
"name": "subtitleModel"
},
{
"id": "17:5808093742337430291",
"id": "17:3816992718513438077",
"name": "marqueeData"
}
],
"relations": []
},
{
"id": "2:5219719017710622568",
"lastPropertyId": "32:376559135715796064",
"id": "2:964797898858734105",
"lastPropertyId": "32:2179349965915472766",
"name": "UploadInfo",
"properties": [
{
"id": "1:255097516228580543",
"id": "1:7484480020552332564",
"name": "id"
},
{
"id": "2:4862782265438399254",
"id": "2:449234706359870061",
"name": "uploadId"
},
{
"id": "3:9184514539294307358",
"id": "3:3218035617529113641",
"name": "start"
},
{
"id": "4:4407893841341240535",
"id": "4:2720715995125586564",
"name": "end"
},
{
"id": "5:6834705732509632258",
"id": "5:5512325991535030467",
"name": "status"
},
{
"id": "6:3755293600480825639",
"id": "6:3565613935298714618",
"name": "progress"
},
{
"id": "7:8014970106600024445",
"id": "7:1288183344224337213",
"name": "title"
},
{
"id": "8:211801046912231571",
"id": "8:609744063671341255",
"name": "tag"
},
{
"id": "9:3805718908445419296",
"id": "9:8519669774027203610",
"name": "desc"
},
{
"id": "10:1195929207222222204",
"id": "10:8805062260874014381",
"name": "filePath"
},
{
"id": "11:3854292479791803570",
"id": "11:146757906384480135",
"name": "videoCoverPath"
},
{
"id": "12:2948601501048763826",
"id": "12:7821999518592260342",
"name": "categoryId"
},
{
"id": "13:6493975000001073703",
"id": "13:6953328528149201140",
"name": "uploadOrResume"
},
{
"id": "14:9123508158748615788",
"id": "14:3035208258413647287",
"name": "videoId"
},
{
"id": "15:7130366175908225544",
"id": "15:2566825800099791679",
"name": "server"
},
{
"id": "16:353062928571240072",
"id": "16:1767248285123702263",
"name": "servicetype"
},
{
"id": "17:5177451697264586973",
"id": "17:6150241550608997901",
"name": "creationTime"
},
{
"id": "18:136388475175600880",
"id": "18:4764594701267324833",
"name": "priority"
},
{
"id": "19:6747895821541271233",
"id": "19:4341222434025282425",
"name": "fileName"
},
{
"id": "20:3527353752901215004",
"id": "20:409756951404409974",
"name": "encodetype"
},
{
"id": "21:4156765761969146925",
"id": "21:7776049824025379551",
"name": "md5"
},
{
"id": "22:3931966140914644823",
"id": "22:3075879940513911204",
"name": "fileByteSize"
},
{
"id": "23:465646228868534846",
"id": "23:2652113663350637120",
"name": "isCrop"
},
{
"id": "24:1603251036511352797",
"id": "24:139105309883061313",
"name": "expectWidth"
},
{
"id": "25:7900344661796872603",
"id": "25:6898594989038108063",
"name": "corner"
},
{
"id": "26:5389773560117934299",
"id": "26:1115673559488587010",
"name": "offsetx"
},
{
"id": "27:5635259923654136266",
"id": "27:2389466547650959770",
"name": "offsety"
},
{
"id": "28:6127743617446753140",
"id": "28:9215329035263770611",
"name": "fontfamily"
},
{
"id": "29:3303482383130782347",
"id": "29:173347385966572550",
"name": "fontsize"
},
{
"id": "30:7815379264503091829",
"id": "30:6439987293458447140",
"name": "fontcolor"
},
{
"id": "31:2777526072822071055",
"id": "31:8623230512527077942",
"name": "fontalpha"
},
{
"id": "32:376559135715796064",
"id": "32:2179349965915472766",
"name": "text"
}
],
"relations": []
},
{
"id": "3:1932175777996060843",
"lastPropertyId": "4:6729974564801104336",
"id": "3:3846385358055158514",
"lastPropertyId": "4:195875901551481959",
"name": "VideoPosition",
"properties": [
{
"id": "1:5779509710981130260",
"id": "1:2675231074633761213",
"name": "id"
},
{
"id": "2:566034591307766224",
"id": "2:5505169350816903697",
"name": "videoId"
},
{
"id": "3:7264609046101814386",
"id": "3:209787929914461889",
"name": "position"
},
{
"id": "4:6729974564801104336",
"id": "4:195875901551481959",
"name": "isPlayCompleted"
}
],
"relations": []
}
],
"lastEntityId": "3:1932175777996060843",
"lastEntityId": "3:3846385358055158514",
"lastIndexId": "0:0",
"lastRelationId": "0:0",
"lastSequenceId": "0:0",
......
......@@ -12,11 +12,12 @@ import android.widget.TextView;
import com.bokecc.vod.utils.MultiUtils;
public class AccountInfoActivity extends AppCompatActivity {
public class AccountInfoActivity extends AppCompatActivity implements View.OnClickListener {
private Activity activity;
private TextView tv_user_id, tv_api_key;
private EditText et_verification_code;
private ImageView iv_back;
private TextView autoPlayStatue;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -31,8 +32,8 @@ public class AccountInfoActivity extends AppCompatActivity {
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);
autoPlayStatue = findViewById(R.id.autoPlayStatue);
autoPlayStatue.setOnClickListener(this);
iv_back = findViewById(R.id.iv_back);
if (!TextUtils.isEmpty(MultiUtils.getVerificationCode())) {
......@@ -41,7 +42,7 @@ public class AccountInfoActivity extends AppCompatActivity {
tv_user_id.setText(ConfigUtil.USER_ID);
tv_api_key.setText(ConfigUtil.API_KEY);
autoPlayStatue.setText(ConfigUtil.AutoPlay ? "是" : "否");
iv_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
......@@ -58,4 +59,12 @@ public class AccountInfoActivity extends AppCompatActivity {
MultiUtils.setVerificationCode(code);
}
@Override
public void onClick(View v) {
if (v.getId() == R.id.autoPlayStatue) {
ConfigUtil.AutoPlay = !ConfigUtil.AutoPlay;
autoPlayStatue.setText(ConfigUtil.AutoPlay ? "是" : "否");
}
}
}
......@@ -8,14 +8,14 @@ package com.bokecc.vod;
public class ConfigUtil {
/**
* 账号ID 可以替换为自己的USER_ID
*
* 391E6E3340A00767
*/
public static final String USER_ID = "391E6E3340A00767";
/**
* 可以替换为自己的API_KEY
*
* T8WdOUuvFEiOsou1xjDr4U73v12M7iNa
*/
public static final String API_KEY = "T8WdOUuvFEiOsou1xjDr4U73v12M7iNa";
/**
......@@ -53,4 +53,6 @@ public class ConfigUtil {
*/
public final static String NOTIFY_URL = "http://www.example.com";
public static boolean AutoPlay = true;
}
......@@ -17,6 +17,10 @@ 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;
......@@ -213,13 +217,13 @@ public class MainActivity extends AppCompatActivity {
private void initData() {
videoDatas = DataUtil.getVideoList();
// 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() {
......
......@@ -16,7 +16,7 @@ public class DanmuColorAdapter extends RecyclerView.Adapter<DanmuColorAdapter.Vi
private List<DanmuColorInfo> mData;
private boolean isPortrait = false;
private OnItemClickListener onItemClickListener;
private DanmuColorAdapter.OnItemClickListener onItemClickListener;
public DanmuColorAdapter(List<DanmuColorInfo> mData, boolean isPortrait) {
this.mData = mData;
......
......@@ -14,6 +14,7 @@ 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;
......
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;
......
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;
......@@ -15,6 +16,7 @@ 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{
......
package com.bokecc.vod.data;
import android.util.Log;
import java.util.List;
import io.objectbox.BoxStore;
......
......@@ -11,7 +11,6 @@ public class DataUtil {
/**
* 配置自己的视频ID
*/
static String[] videoIds = new String[]{};
......
package com.bokecc.vod.data;
import com.bokecc.sdk.mobile.upload.VideoInfo;
import io.objectbox.annotation.Convert;
import io.objectbox.annotation.Entity;
import io.objectbox.annotation.Id;
import io.objectbox.annotation.Transient;
@Entity
public class UploadInfo {
......
......@@ -13,8 +13,11 @@ import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.bokecc.vod.ConfigUtil;
import com.bokecc.sdk.mobile.download.DownloadConfig;
import com.bokecc.sdk.mobile.download.VodDownloadManager;
import com.bokecc.sdk.mobile.util.HttpUtil;
import com.bokecc.vod.R;
import com.bokecc.vod.ConfigUtil;
import com.bokecc.vod.utils.MultiUtils;
......@@ -33,7 +36,7 @@ public class DownloadListActivity extends FragmentActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_download_list);
MultiUtils.setStatusBarColor(this, R.color.transparent,true);
MultiUtils.setStatusBarColor(this,R.color.transparent,true);
initView();
iv_back.setOnClickListener(new View.OnClickListener() {
......
......@@ -13,6 +13,7 @@ import android.support.annotation.Nullable;
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.data.DataSet;
import com.bokecc.vod.data.DownloadInfo;
import com.bokecc.vod.utils.MultiUtils;
......
......@@ -13,6 +13,9 @@ import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
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.ConfigUtil;
import com.bokecc.vod.R;
import com.bokecc.vod.adapter.DownloadedViewAdapter;
......@@ -28,6 +31,7 @@ import com.bokecc.vod.view.SelectPlayerDialog;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
......