From 1b3a0b279d0549bcfc3480f6e4e35359b5289f91 Mon Sep 17 00:00:00 2001 From: YangJH Date: Wed, 24 Jan 2024 01:42:55 +0900 Subject: [PATCH] fix: check multi window mode when host pause - some OS version call onPause on multi-window mode --- .../java/com/brentvatne/exoplayer/ReactExoplayerView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 69569287b5..359399cc8b 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -383,7 +383,9 @@ public void onHostPause() { enterPictureInPictureMode(); return; } - if (playInBackground || isInPictureInPicture) { + Activity activity = themedReactContext.getCurrentActivity(); + boolean isInMultiWindowMode = Util.SDK_INT >= 24 && (activity.isInMultiWindowMode()); + if (playInBackground || isInPictureInPicture || isInMultiWindowMode) { return; } setPlayWhenReady(false);