Loading android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +13 −16 Original line number Diff line number Diff line Loading @@ -320,9 +320,9 @@ class ReactExoplayerView extends FrameLayout implements /** * 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 * @param view view needs to update layout */ private void reLayout(View view) { if (view == null) return; Loading Loading @@ -1141,16 +1141,13 @@ class ReactExoplayerView extends FrameLayout implements /** * 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) { if(controls && (exoPlayerView != null)) { //adding the playerControlView if (controls && exoPlayerView != null) { addPlayerControl(); } else { if(getChildAt(1) instanceof PlayerControlView && (exoPlayerView != null)){ } else if (getChildAt(1) instanceof PlayerControlView && exoPlayerView != null) { removeViewAt(1); } } } } Loading
android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +13 −16 Original line number Diff line number Diff line Loading @@ -320,9 +320,9 @@ class ReactExoplayerView extends FrameLayout implements /** * 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 * @param view view needs to update layout */ private void reLayout(View view) { if (view == null) return; Loading Loading @@ -1141,16 +1141,13 @@ class ReactExoplayerView extends FrameLayout implements /** * 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) { if(controls && (exoPlayerView != null)) { //adding the playerControlView if (controls && exoPlayerView != null) { addPlayerControl(); } else { if(getChildAt(1) instanceof PlayerControlView && (exoPlayerView != null)){ } else if (getChildAt(1) instanceof PlayerControlView && exoPlayerView != null) { removeViewAt(1); } } } }