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

3.16.5

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