Skip to content

Commit

Permalink
Merge pull request TheWidlarzGroup#1383 from react-native-community/b…
Browse files Browse the repository at this point in the history
…ugfix/texture-view-default

Fix bug where useTextureView wasn't defaulting to true
  • Loading branch information
cobarx authored Dec 13, 2018
2 parents 62f7221 + 5a053a7 commit 35b168b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class ExoPlayerView extends FrameLayout {
private Context context;
private ViewGroup.LayoutParams layoutParams;

private boolean useTextureView = false;
private boolean useTextureView = true;
private boolean hideShutterView = false;

public ExoPlayerView(Context context) {
Expand Down Expand Up @@ -162,8 +162,10 @@ public View getVideoSurfaceView() {
}

public void setUseTextureView(boolean useTextureView) {
this.useTextureView = useTextureView;
updateSurfaceView();
if (useTextureView != this.useTextureView) {
this.useTextureView = useTextureView;
updateSurfaceView();
}
}

public void setHideShutterView(boolean hideShutterView) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ class ReactExoplayerView extends FrameLayout implements
private boolean disableFocus;
private float mProgressUpdateInterval = 250.0f;
private boolean playInBackground = false;
private boolean useTextureView = false;
private boolean hideShutterView = false;
private Map<String, String> requestHeaders;
// \ End props

Expand Down

0 comments on commit 35b168b

Please sign in to comment.