question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom PlayerView turns out black when using TextureView as surface_type

See original GitHub issue

PlayerView 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:open
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
raicalvincommented, Nov 18, 2020

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.

0reactions
MujammilAhamedcommented, Dec 10, 2020

Any update on the issue

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found