Commit 3e4a30ab authored by zhangww's avatar zhangww
Browse files

3.16.5

1.添加高版本存储适配
2.图文打点相关优化
parent b8d2e59f
......@@ -61,7 +61,7 @@ dependencies {
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.bokecc:CCVOD:3.16.4'
implementation 'com.bokecc:CCVOD:3.16.5'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.umeng.umsdk:common:9.4.0'
......
......@@ -43,7 +43,7 @@ public class HuoDeApplication extends MultiDexApplication {
String downloadPath = MultiUtils.createDownloadPath();
//使用VodDownloadManager需要以单例VodDownloadManager.getInstance()的形式调用
VodDownloadManager.getInstance().init(HuoDeApplication.getContext(), ConfigUtil.USER_ID, ConfigUtil.API_KEY, downloadPath);
UMConfigure.init( context, getString(R.string.umeng_app_key), "HuoDeVod", 0,null);
UMConfigure.init(context, getString(R.string.umeng_app_key), "HuoDeVod", 0, null);
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
InitializeManager.getInstance(getContext()).initialize();
}
......@@ -52,7 +52,7 @@ public class HuoDeApplication extends MultiDexApplication {
return context;
}
public static SharedPreferences getSp(){
public static SharedPreferences getSp() {
return sp;
}
......@@ -68,13 +68,14 @@ public class HuoDeApplication extends MultiDexApplication {
drmServer.start();
setDrmServerPort(drmServer.getPort());
} catch (Exception e) {
Toast.makeText(getApplicationContext(), "启动解密服务失败,请检查网络限制情况:"+e.getMessage(), Toast.LENGTH_LONG).show();
Toast.makeText(getApplicationContext(), "启动解密服务失败,请检查网络限制情况:" + e.getMessage(), Toast.LENGTH_LONG).show();
}
}
private void initDWStorage() {
DWSdkStorage myStorage = new DWSdkStorage() {
private final SharedPreferences sp = getApplicationContext().getSharedPreferences("mystorage", MODE_PRIVATE);
@Override
public void put(String key, String value) {
SharedPreferences.Editor editor = sp.edit();
......
......@@ -20,6 +20,7 @@ import androidx.core.content.ContextCompat;
import com.bokecc.vod.adapter.PlayVideoAdapter;
import com.bokecc.vod.data.DataSet;
import com.bokecc.vod.data.DataUtil;
import com.bokecc.vod.data.HuodeVideoInfo;
import com.bokecc.vod.download.DownloadListActivity;
import com.bokecc.vod.download.DownloadService;
......
......@@ -537,6 +537,11 @@ public class MediaPlayActivity extends Activity implements View.OnClickListener,
*/
private boolean inKnowledgeRange;
/**
* 当前是否已经执行获取视频截图
*/
private boolean executeStatue = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -1389,6 +1394,7 @@ public class MediaPlayActivity extends Activity implements View.OnClickListener,
@Override
public void onHotSpotInfo(LinkedHashMap<Integer, HotSpotInfo> hotSpotInfoList) {
executeStatue = false;
sb_progress.setHotspotInfo(hotSpotInfoList);
}
});
......@@ -3157,6 +3163,7 @@ public class MediaPlayActivity extends Activity implements View.OnClickListener,
videoCover = selectedVideoCover;
resetInfo();
getAdInfo();
executeStatue = false;
}
});
selectVideoDialog.show();
......@@ -3403,7 +3410,10 @@ public class MediaPlayActivity extends Activity implements View.OnClickListener,
//运行跑马灯
mv_video.start();
//获取图文打点相关信息
if (!executeStatue) {
player.executePortInfo();
executeStatue = true;
}
}
@Override
......@@ -3785,6 +3795,7 @@ public class MediaPlayActivity extends Activity implements View.OnClickListener,
//播放下一个视频
private void playNextVideo() {
executeStatue = false;
isPrepared = false;
iv_play_pause.setImageResource(ConfigUtil.AutoPlay ? R.mipmap.iv_pause : R.mipmap.iv_play);
player.resetPlayedAndPausedTime();
......
......@@ -3320,8 +3320,6 @@ public class SpeedPlayActivity extends Activity implements View.OnClickListener,
.skipMemoryCache(true)
.diskCacheStrategy(DiskCacheStrategy.NONE)
.into(coverImage);
} else {
Glide.with(this).load(R.drawable.test).into(coverImage);
}
if (player.definitionChanged()) {
coverImage.setVisibility(View.INVISIBLE);
......@@ -3445,8 +3443,6 @@ public class SpeedPlayActivity extends Activity implements View.OnClickListener,
}
//运行跑马灯
mv_video.start();
//获取图文打点相关信息
player.executePortInfo();
}
@Override
......
......@@ -222,6 +222,11 @@ public class HotspotSeekBar extends View implements View.OnClickListener {
if (previewPopupWindow == null) {
initPreviewPopup();
}
if (thumbnailsList == null || thumbnailsList.isEmpty()) {
previewImage.setVisibility(INVISIBLE);
}else {
previewImage.setVisibility(VISIBLE);
}
if (previewPopupWindow != null && previewPopupWindow.isShowing()) {
return;
}
......@@ -451,8 +456,11 @@ public class HotspotSeekBar extends View implements View.OnClickListener {
int thumbnailsPageIndex = (int) (currentDuration / (6 * 1000 * 100));
int thumbnailsIndex = (int) ((currentDuration / (6 * 1000)) - thumbnailsPageIndex * 100);
if (thumbnailsList != null && !thumbnailsList.isEmpty() && thumbnailsPageIndex < thumbnailsList.size()) {
previewImage.setVisibility(VISIBLE);
String url = thumbnailsList.get(thumbnailsPageIndex);
decodePreview(url, thumbnailsIndex);
} else {
previewImage.setVisibility(INVISIBLE);
}
}
......
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment