From 5203fa63d49c6c503b4e4dac4a97ec1241b75ea2 Mon Sep 17 00:00:00 2001 From: wood1986 <5212215+wood1986@users.noreply.github.com> Date: Thu, 8 Sep 2022 00:31:47 -0700 Subject: [PATCH] fix: handle the initial fullscreen props --- .../com/brentvatne/exoplayer/ReactExoplayerView.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index d1a7d80c..297a230f 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1770,6 +1770,16 @@ class ReactExoplayerView extends FrameLayout implements if (activity == null) { return; } + + if (fullScreenPlayerView == null) { + fullScreenPlayerView = new FullScreenPlayerView(getContext(), exoPlayerView, playerControlView, new OnBackPressedCallback(true) { + @Override + public void handleOnBackPressed() { + setFullscreen(false); + } + }); + } + Window window = activity.getWindow(); View decorView = window.getDecorView(); int uiOptions;