display player view correctly after dismissing PIP view #1004

Merged
akinwale merged 1 commit from player-resume-black-screen into master 2020-09-04 13:33:53 +02:00
2 changed files with 4 additions and 0 deletions
Showing only changes of commit d6baf3d1c8 - Show all commits

View file

@ -3095,6 +3095,9 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
if (appPlayer != null && inPictureInPictureMode && !isBackgroundPlaybackEnabled()) {
appPlayer.setPlayWhenReady(false);
}
if (inPictureInPictureMode) {
MainActivity.playerReassigned = true;
}
super.onStop();
}

View file

@ -772,6 +772,7 @@ public class FileViewFragment extends BaseFragment implements
View root = getView();
if (root != null) {
PlayerView view = root.findViewById(R.id.file_view_exoplayer_view);
view.setVisibility(View.VISIBLE);
view.setPlayer(null);
view.setPlayer(MainActivity.appPlayer);
}