|
|
|
|
@ -512,17 +512,6 @@ public class PlayFragment extends BaseLazyFragment { |
|
|
|
|
if(autoRetryCount>0 && url.contains(".m3u8")){ |
|
|
|
|
url="http://home.jundie.top:666/unBom.php?m3u8="+url;//尝试去bom头再次播放
|
|
|
|
|
} |
|
|
|
|
if (url.startsWith("data:application/dash+xml;base64,")) { |
|
|
|
|
PlayerHelper.updateCfg(mVideoView, mVodPlayerCfg, 2); |
|
|
|
|
App.getInstance().setDashData(url.split("base64,")[1]); |
|
|
|
|
url = ControlManager.get().getAddress(true) + "dash/proxy.mpd"; |
|
|
|
|
} else if (url.contains(".mpd") || url.contains("type=mpd")) { |
|
|
|
|
PlayerHelper.updateCfg(mVideoView, mVodPlayerCfg, 2); |
|
|
|
|
} else { |
|
|
|
|
PlayerHelper.updateCfg(mVideoView, mVodPlayerCfg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String finalUrl = url; |
|
|
|
|
if (mActivity == null) return; |
|
|
|
|
requireActivity().runOnUiThread(new Runnable() { |
|
|
|
|
@Override |
|
|
|
|
@ -530,8 +519,7 @@ public class PlayFragment extends BaseLazyFragment { |
|
|
|
|
stopParse(); |
|
|
|
|
if (mVideoView != null) { |
|
|
|
|
mVideoView.release(); |
|
|
|
|
|
|
|
|
|
if (finalUrl != null) { |
|
|
|
|
if (url != null) { |
|
|
|
|
try { |
|
|
|
|
int playerType = mVodPlayerCfg.getInt("pl"); |
|
|
|
|
if (playerType >= 10) { |
|
|
|
|
@ -548,6 +536,16 @@ public class PlayFragment extends BaseLazyFragment { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
hideTip(); |
|
|
|
|
String finalUrl = url; |
|
|
|
|
if (finalUrl.startsWith("data:application/dash+xml;base64,")) { |
|
|
|
|
PlayerHelper.updateCfg(mVideoView, mVodPlayerCfg, 2); |
|
|
|
|
App.getInstance().setDashData(finalUrl.split("base64,")[1]); |
|
|
|
|
finalUrl = ControlManager.get().getAddress(true) + "dash/proxy.mpd"; |
|
|
|
|
} else if (finalUrl.contains(".mpd") || finalUrl.contains("type=mpd")) { |
|
|
|
|
PlayerHelper.updateCfg(mVideoView, mVodPlayerCfg, 2); |
|
|
|
|
} else { |
|
|
|
|
PlayerHelper.updateCfg(mVideoView, mVodPlayerCfg); |
|
|
|
|
} |
|
|
|
|
mVideoView.setProgressKey(progressKey); |
|
|
|
|
if (headers != null) { |
|
|
|
|
mVideoView.setUrl(finalUrl, headers); |
|
|
|
|
@ -1776,4 +1774,4 @@ public class PlayFragment extends BaseLazyFragment { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|