Hello, 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:
`
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" />
`
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:
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!
It is expected not to work on emulators, should work fine on pixel 3 though.
But the sample app works on the same emulator?
It is expected not to work on emulators, should work fine on pixel 3 though.
Repros also on a real device (OnePlus)
Do you have the same problem with the sample app? if not there must be something wrong with the way you're using the library.
Hello, I'm having this same issue did you managed to solve it?
I'm also stuck with this problem, tried everything but still no luck.
@AbelTesfaye found the solution for this. Turns out I didn't enable hardware acceleration in the manifest. Thanks
in the AndroidManifest.xml
<application
...
android:hardwareAccelerated="true">
...
</application>
@AbelTesfaye found the solution for this. Turns out I didn't enable hardware acceleration in the manifest. Thanks
in the
AndroidManifest.xml<application ... android:hardwareAccelerated="true"> ... </application>
Its working awesome...Like a magic...
Thanks a lot...
@AbelTesfaye found the solution for this. Turns out I didn't enable hardware acceleration in the manifest. Thanks
in the
AndroidManifest.xml<application ... android:hardwareAccelerated="true"> ... </application>
thank you too!! (thanks to the owner too @PierfrancescoSoffritti )
that solution works
@AbelTesfaye found the solution for this. Turns out I didn't enable hardware acceleration in the manifest. Thanks
in the
AndroidManifest.xml<application ... android:hardwareAccelerated="true"> ... </application>
Was the solution for me as well. @PierfrancescoSoffritti Can you please mark this as the solution as I have seen this in closed tickets as well as a lot of comments regarding this issue.
It's already in the doc.
Most helpful comment
@AbelTesfaye found the solution for this. Turns out I didn't enable hardware acceleration in the manifest. Thanks
in the
AndroidManifest.xml