Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video shows blank screen while audio and controls work #474

Closed
jerbotron opened this issue Nov 11, 2019 · 16 comments
Closed

Video shows blank screen while audio and controls work #474

jerbotron opened this issue Nov 11, 2019 · 16 comments
Labels

Comments

@jerbotron
Copy link

jerbotron commented Nov 11, 2019

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.
Screen Shot 2019-11-11 at 3 53 10 PM

Here is my resource file, copied straight from the sample app:

`

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

  • 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!

@PierfrancescoSoffritti
Copy link
Owner

It is expected not to work on emulators, should work fine on pixel 3 though.

@jerbotron
Copy link
Author

But the sample app works on the same emulator?

It is expected not to work on emulators, should work fine on pixel 3 though.

@jerbotron
Copy link
Author

Repros also on a real device (OnePlus)

IMG_1782

@PierfrancescoSoffritti
Copy link
Owner

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.

@CandinhoX
Copy link

Hello, I'm having this same issue did you managed to solve it?

@brookmg
Copy link

brookmg commented Mar 28, 2020

I'm also stuck with this problem, tried everything but still no luck.

@brookmg
Copy link

brookmg commented Mar 28, 2020

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

@vikasjplutus
Copy link

@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...

@kinsog
Copy link

kinsog commented Jun 10, 2020

@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

@StefanVanStaden
Copy link

@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.

@PierfrancescoSoffritti
Copy link
Owner

It's already in the doc.

@KumarVelu
Copy link

It is expected not to work on emulators, should work fine on pixel 3 though.

@PierfrancescoSoffritti
Yes, facing the same problem in emulator
Why doesn't it work in emulators ? I am running it in the android tv emulator and having this issue of screen being blank, while the video is getting played.
Currently have no real tv device to test it out.

@PierfrancescoSoffritti
Copy link
Owner

I suspect it has to do with webview/hardware acceleration on the emulators.

@KumarVelu
Copy link

I suspect it has to do with webview/hardware acceleration on the emulators.

Thanks for your quick reply.
I have added the android:hardwareAccelerated="true" in emulator and yet this error happens.

@ParthP8399
Copy link

Oh my god thank you so much. I spend around 1 day trying to solve the black screen

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants