Android-youtube-player: Android TV Green Screen

Created on 16 Apr 2019  路  18Comments  路  Source: PierfrancescoSoffritti/android-youtube-player

When I use it on Android TV, it will be green when playing video.
IMG20190416175904
IMG20190416175908

question

Most helpful comment

Until Youtube, Android or whoever want to fix this render issue we decided use the Pierfrancesco's library for all users less the Android TV ones. For them we use this code:

Intent intent = YouTubeIntents.createPlayVideoIntentWithOptions(this, videoId, true, true);
startActivity(intent);

You'll need add that library to your project:
https://developers.google.com/youtube/android/player/downloads/

More info:
https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubeIntents

All 18 comments

It is probably a problem with the version of webview used on the tv.

It is probably a problem with the version of webview used on the tv.

Is this caused by hardware acceleration?

mm possibly, I have no idea to be honest. Do you have it enable?

I have never used the player on Android TV, but other users have, it was working fine for them.

I am trying it, thank you.

Ok. Let me know if you make any progress!

do we have any progress related with this issue?

I've tested directly with a webview and same problem (so the issue is not in the library)

When I defined a small vide size it plays perfect (ie 300dp x 200dp) bute, bigger (400dp x 300dp) or fullscreen back the problem.

Interesting. Maybe it's worth opening a bug on the IFrame Player issue tracker. I'll look for it tomorrow!

Checking the @sky286753213 photos I've seen the issue is happening in Xiaomi MIBOX4 devices. (We're testing in the same model)

Until Youtube, Android or whoever want to fix this render issue we decided use the Pierfrancesco's library for all users less the Android TV ones. For them we use this code:

Intent intent = YouTubeIntents.createPlayVideoIntentWithOptions(this, videoId, true, true);
startActivity(intent);

You'll need add that library to your project:
https://developers.google.com/youtube/android/player/downloads/

More info:
https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubeIntents

Great, thanks for the update! Could you file a bug here too? So they can look into it. Also after filing the bug could you post the link here?

thanks a lot!

You can install this app in a a Xiaomi MIBOX4 and you'll watch the video in green :).

https://www.dropbox.com/s/vpjpq950p43a3tt/MyApplication.zip?dl=0

Sorry i forgot to attach the link yesterday, too much multitasking lol I have edited the previous comment now.

Thanks!

Any update on issue? I am facing the same on Chinese TV Box running 7.1.1.

Few days ago one user sent me this screenshot taken from a Xiamoi MIBOX4:
MIBOX4 Last Update

The problem looks be a hardware/firmware issue and it's fixed in last updates.

I found the Solution for it. It's because of Hardware Acceleration ... Can be solved by following line

youTubePlayerView.setLayerType(View.LAYER_TYPE_HARDWARE, null);

Was this page helpful?
0 / 5 - 0 ratings