@@ -61,6 +61,7 @@ public class DetailPlayer extends AppCompatActivity {
6161
6262 private boolean isPlay ;
6363 private boolean isPause ;
64+ private boolean inPipMode = false ;
6465
6566 private OrientationUtils orientationUtils ;
6667
@@ -448,6 +449,7 @@ public void onClick(View v) {
448449 @ Override
449450 public void onClick (View v ) {
450451 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .N ) {
452+ inPipMode = true ;
451453 DetailPlayer .this .enterPictureInPictureMode ();
452454 }
453455 }
@@ -512,6 +514,11 @@ public void onClick(View v) {
512514 });
513515 }
514516
517+ @ Override
518+ public void onPictureInPictureModeChanged (boolean isInPictureInPictureMode , Configuration newConfig ) {
519+ super .onPictureInPictureModeChanged (isInPictureInPictureMode , newConfig );
520+ inPipMode = isInPictureInPictureMode ;
521+ }
515522
516523 @ Override
517524 public void onBackPressed () {
@@ -565,7 +572,7 @@ protected void onDestroy() {
565572 public void onConfigurationChanged (@ NonNull Configuration newConfig ) {
566573 super .onConfigurationChanged (newConfig );
567574 //如果旋转了就全屏
568- if (isPlay && !isPause ) {
575+ if (isPlay && !isPause && ! inPipMode ) {
569576 binding .detailPlayer .onConfigurationChanged (this , newConfig , orientationUtils , true , true );
570577 }
571578 }
@@ -662,7 +669,7 @@ private String getUrl() {
662669 //String url = "http://111.198.24.133:83/yyy_login_server/pic/YB059284/97778276040859/1.mp4";
663670 //String url = "http://vr.tudou.com/v2proxy/v?sid=95001&id=496378919&st=3&pw=";
664671 //String url = "http://pl-ali.youku.com/playlist/m3u8?type=mp4&ts=1490185963&keyframe=0&vid=XMjYxOTQ1Mzg2MA==&ep=ciadGkiFU8cF4SvajD8bYyuwJiYHXJZ3rHbN%2FrYDAcZuH%2BrC6DPcqJ21TPs%3D&sid=04901859548541247bba8&token=0524&ctype=12&ev=1&oip=976319194";
665- String url = "https ://flipfit-cdn.akamaized. net/flip_hls/6656423247ffe600199e8363-15125d/video_h1 .m3u8" ;
672+ String url = "http ://devimages.apple.com.edgekey. net/streaming/examples/bipbop_4x3/gear3/prog_index .m3u8" ;
666673 //String url = "https://res.exexm.com/cw_145225549855002";
667674 //String url = "http://storage.gzstv.net/uploads/media/huangmeiyan/jr05-09.mp4";//mepg
668675 //String url = "https://zh-files.oss-cn-qingdao.aliyuncs.com/20170808223928mJ1P3n57.mp4";//90度
0 commit comments