Code formatting cleanups for controls
This commit is contained in:
parent
c361b795fc
commit
40803496f9
@ -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;
|
||||
@ -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…
Reference in New Issue
Block a user