From 2d76e491d3bfa0a12931f547dd99e5243ed7e1ae Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Sat, 13 Oct 2018 20:23:30 -0700 Subject: [PATCH] Switch useTextureView to default to `true` (#1286) A number of people run into SurfaceView layering issues. It seems better to default to the more compatible option and let people reconfigure if they need the extra SurfaceView performance. --- README.md | 8 +++++--- .../brentvatne/exoplayer/ReactExoplayerViewManager.java | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 05bb6378..082debb4 100644 --- a/README.md +++ b/README.md @@ -644,14 +644,16 @@ textTracks={[ Platforms: Android ExoPlayer, iOS #### useTextureView -Output to a TextureView instead of the default SurfaceView. In general, you will want to use SurfaceView because it is more efficient and provides better performance. However, SurfaceViews has two limitations: +Controls whether to output to a TextureView or SurfaceView. + +SurfaceView is more efficient and provides better performance but has two limitations: * It can't be animated, transformed or scaled * You can't overlay multiple SurfaceViews useTextureView can only be set at same time you're setting the source. -* **false (default)** - Use a SurfaceView -* **true** - Use a TextureView +* **true (default)** - Use a TextureView +* **false** - Use a SurfaceView Platforms: Android ExoPlayer diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java index 9ead70ce..4d1ec286 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java @@ -215,7 +215,7 @@ public class ReactExoplayerViewManager extends ViewGroupManager