@@ -501,23 +501,13 @@ void playUrl(String url, HashMap<String, String> headers) {
501501 if (autoRetryCount >1 && url .contains (".m3u8" )){
502502 url ="http://home.jundie.top:666/unBom.php?m3u8=" +url ;//尝试去bom头再次播放
503503 }
504- if (url .startsWith ("data:application/dash+xml;base64," )) {
505- PlayerHelper .updateCfg (mVideoView , mVodPlayerCfg , 2 );
506- App .getInstance ().setDashData (url .split ("base64," )[1 ]);
507- url = ControlManager .get ().getAddress (true ) + "dash/proxy.mpd" ;
508- } else if (url .contains (".mpd" ) || url .contains ("type=mpd" )) {
509- PlayerHelper .updateCfg (mVideoView , mVodPlayerCfg , 2 );
510- } else {
511- PlayerHelper .updateCfg (mVideoView , mVodPlayerCfg );
512- }
513- String finalUrl = url ;
514504 runOnUiThread (new Runnable () {
515505 @ Override
516506 public void run () {
517507 stopParse ();
518508 if (mVideoView != null ) {
519509 mVideoView .release ();
520- if (finalUrl != null ) {
510+ if (url != null ) {
521511 try {
522512 int playerType = mVodPlayerCfg .getInt ("pl" );
523513 if (playerType >= 10 ) {
@@ -534,6 +524,16 @@ public void run() {
534524 e .printStackTrace ();
535525 }
536526 hideTip ();
527+ String finalUrl = url ;
528+ if (finalUrl .startsWith ("data:application/dash+xml;base64," )) {
529+ PlayerHelper .updateCfg (mVideoView , mVodPlayerCfg , 2 );
530+ App .getInstance ().setDashData (finalUrl .split ("base64," )[1 ]);
531+ finalUrl = ControlManager .get ().getAddress (true ) + "dash/proxy.mpd" ;
532+ } else if (finalUrl .contains (".mpd" ) || finalUrl .contains ("type=mpd" )) {
533+ PlayerHelper .updateCfg (mVideoView , mVodPlayerCfg , 2 );
534+ } else {
535+ PlayerHelper .updateCfg (mVideoView , mVodPlayerCfg );
536+ }
537537 mVideoView .setProgressKey (progressKey );
538538 if (headers != null ) {
539539 mVideoView .setUrl (finalUrl , headers );
@@ -1723,4 +1723,4 @@ public void onReceivedSslError(XWalkView view, ValueCallback<Boolean> callback,
17231723 }
17241724 }
17251725
1726- }
1726+ }
0 commit comments