@picsa/capacitor-video-player 8.0.1 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -892,6 +892,12 @@ public class FullscreenExoPlayerFragment extends Fragment {
|
|
|
892
892
|
public void onResume() {
|
|
893
893
|
super.onResume();
|
|
894
894
|
//if (chromecast && castContext != null) castContext.addCastStateListener(castStateListener);
|
|
895
|
+
// Skip resume handling when the view was never inflated (orphaned fragment
|
|
896
|
+
// recreation after process death returns an empty View in onCreateView, so
|
|
897
|
+
// styledPlayerView stays null while async removal is still pending).
|
|
898
|
+
if (styledPlayerView == null) {
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
895
901
|
if (!isInPictureInPictureMode) {
|
|
896
902
|
hideSystemUi();
|
|
897
903
|
if ((Util.SDK_INT < 24 || player == null)) {
|
|
@@ -943,6 +949,11 @@ public class FullscreenExoPlayerFragment extends Fragment {
|
|
|
943
949
|
* Initialize the player
|
|
944
950
|
*/
|
|
945
951
|
private void initializePlayer() {
|
|
952
|
+
// Guard against orphaned fragment recreations where onCreateView returned
|
|
953
|
+
// an empty View without inflating the layout (styledPlayerView is null).
|
|
954
|
+
if (styledPlayerView == null) {
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
946
957
|
if (player == null) {
|
|
947
958
|
ExoTrackSelection.Factory videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory();
|
|
948
959
|
trackSelector = new DefaultTrackSelector(context, videoTrackSelectionFactory);
|