Video shows blank screen while audio and controls work
See original GitHub issueHello, I promise I’ve read all the threads on issues related to this and I’ve tried all the suggested remedies but still experiencing the following issues.
This is the screen that I see, the video view is basically a blank screen but the audio and controls work.
Here is my resource file, copied straight from the sample app:
` <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android">
<com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView
android:id="@+id/youtube_player_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:autoPlay="true"
app:videoId="YE7VzlLtp-4"
app:showYouTubeButton="false"
app:showSeekBar="false" />
</LinearLayout >
`
Here is my Activity code:
override fun onCreate(state: Bundle?) { super.onCreate(state) setContentView(R.layout.activity_ads_video_detail) playerView = findViewById(R.id.youtube_player_view) lifecycle.addObserver(playerView) }
The environment I’m testing on:
- Lib version: 10.0.5
- Kotlin
- Pixel 2 Emulator, API 23, x86_64
- Also reproduced on real Pixel 3 Device running API 28
- Also tried setting hardwareAccelerated=true in the manifest
I don’t think it’s a code related issue, but I’m running out of ideas on what to try next… please help! Thank you!
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (5 by maintainers)
Top GitHub Comments
@AbelTesfaye found the solution for this. Turns out I didn’t enable hardware acceleration in the manifest. Thanks
in the
AndroidManifest.xml
Hello, I’m having this same issue did you managed to solve it?