Loading android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +13 −16 Original line number Original line Diff line number Diff line Loading @@ -320,9 +320,9 @@ class ReactExoplayerView extends FrameLayout implements /** /** * Update the layout * Update the layout * @param view view needs to update layout * * * This is a workaround for the open bug in react-native: https://github.com/facebook/react-native/issues/17968 * This is a workaround for the open bug in react-native: https://github.com/facebook/react-native/issues/17968 * @param view view needs to update layout */ */ private void reLayout(View view) { private void reLayout(View view) { if (view == null) return; if (view == null) return; Loading Loading @@ -1141,16 +1141,13 @@ class ReactExoplayerView extends FrameLayout implements /** /** * Handling controls prop * Handling controls prop * * * @param controls value of the controls prop passed from react-native * @param controls Controls prop, if true enable controls, if false disable them */ */ public void setControls(boolean controls) { public void setControls(boolean controls) { if(controls && (exoPlayerView != null)) { if (controls && exoPlayerView != null) { //adding the playerControlView addPlayerControl(); addPlayerControl(); } else { } else if (getChildAt(1) instanceof PlayerControlView && exoPlayerView != null) { if(getChildAt(1) instanceof PlayerControlView && (exoPlayerView != null)){ removeViewAt(1); removeViewAt(1); } } } } } } } Loading
android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +13 −16 Original line number Original line Diff line number Diff line Loading @@ -320,9 +320,9 @@ class ReactExoplayerView extends FrameLayout implements /** /** * Update the layout * Update the layout * @param view view needs to update layout * * * This is a workaround for the open bug in react-native: https://github.com/facebook/react-native/issues/17968 * This is a workaround for the open bug in react-native: https://github.com/facebook/react-native/issues/17968 * @param view view needs to update layout */ */ private void reLayout(View view) { private void reLayout(View view) { if (view == null) return; if (view == null) return; Loading Loading @@ -1141,16 +1141,13 @@ class ReactExoplayerView extends FrameLayout implements /** /** * Handling controls prop * Handling controls prop * * * @param controls value of the controls prop passed from react-native * @param controls Controls prop, if true enable controls, if false disable them */ */ public void setControls(boolean controls) { public void setControls(boolean controls) { if(controls && (exoPlayerView != null)) { if (controls && exoPlayerView != null) { //adding the playerControlView addPlayerControl(); addPlayerControl(); } else { } else if (getChildAt(1) instanceof PlayerControlView && exoPlayerView != null) { if(getChildAt(1) instanceof PlayerControlView && (exoPlayerView != null)){ removeViewAt(1); removeViewAt(1); } } } } } } }