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.

Video shows blank screen while audio and controls work

See original GitHub issue

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:

` <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:closed
  • Created 4 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
brookmgcommented, 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>
4reactions
CandinhoXcommented, Feb 24, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Black Screen When Playing Videos on Windows ...
The black video screen has always made you annoyed. The article will tell you how to make it easy for you to get...
Read more >
Resolve Black Screen Issue When Play Videos
Sometimes, while watching a video on a media player or YouTube, you tend to have a black screen, but at the back, the...
Read more >
How To Fix Black Screen While Trying To Play Videos
Read on to know how to fix black screen while playing videos error with the help of prominent solutions including Stellar Repair for...
Read more >
Black screen when trying to play video - Microsoft Community
Black screen when trying to play video, But audio works fine. What to do? Hello. So im having a problem. Sometimes, Depending on...
Read more >
Screen Goes Black When Watching Videos On Windows 10 ...
A black screen may occur unexpectedly when you playing a video on your Windows computer. Use a free video repair tool to fix...
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