Custom PlayerView turns out black when using TextureView as surface_type
See original GitHub issuePlayerView turns out black when the app goes to onPause and onResume in the BottomSheet Dialog Fragment.
Reproduction steps
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/exo_player_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
app:controller_layout_id="@layout/controller_view"
app:hide_on_touch="false"
app:show_buffering="never"
app:show_timeout="0"
app:auto_show="true"
app:use_sensor_rotation="true"
app:shutter_background_color="@color/actually_transparent"
app:surface_type="texture_view"
app:keep_content_on_player_reset="true"
app:use_controller="true" />
PlayerBottomSheetDialogFragment.kt
exoplayerView?.let {
playerView.player = null
playerView.player = exoPlayer
playerView.performClick()
}
The version of ExoPlayer being used - 2.12.1
Device(s) and version(s) of Android being used - Samsung Android 8.0 & 9.0. ‘S’ series devices
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Exo Player becomes black when animating the container ...
It's turned out that using " texture_view " for " app:surface_type " will resolve the issue, This will make the Exo player use...
Read more >UI components - ExoPlayer
Such effects included the view's contents appearing to lag slightly behind where it should be displayed, and the view turning black when subjected...
Read more >ui-components.md · r2.10.3_docs · mirrors / google / ExoPlayer ...
PlayerView is a high level view for playbacks. It displays video, subtitles and album art during playback, as well as playback controls using...
Read more >docs/ui-components.md · master · Lahlouh, Ishak / RFC_Player
deployment of a Random Forest Classier Model in Exoplayer using Weka API. ... The surface_type attribute of StyledPlayerView and PlayerView ...
Read more >TextureView - Android Developers
Unlike SurfaceView , TextureView does not create a separate window but behaves as ... For instance, if you use a TextureView to display...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’re having a similar issue on our application too when using ExoPlayer. Sometimes when we resume the app from the background or when we lock the device and unlock the device, the ExoPlayer scrub bar view turns completely black and the User is not able to tap or modify the play position while the audio continues playing.
Any update on the issue