Closed milan-fabian closed 1 year ago
Try enabling or disabling hardware acceleration.
@Serkali-sudo do you mean enable/disable hardware acceleration in the entire app, or is there a way to enable/disable hardware acceleration just for YouTubePlayerView?
YouTubePlayerView is actually webview and there is a way to enable/disable hardware acceleration for webview spesifically. If enabling or disabling hardware acceleration in the entire app causes problems other parts of the app you can try to enable/disable YouTubePlayerView's hardware acceleration spesifically but you are gonna have edit the library to do that.
I accessed WebViewYouTubePlayer via reflection and tried:
webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null)
- YouTube controls were displayed, but without any video, on all test devices. I assume WebView requires hardware acceleration for video.webView.setLayerType(View.LAYER_TYPE_HARDWARE, null)
- the same behavior as before, it works correctly on all tested devices except Xiaomi Mi Box 4. It's flickering on Xiaomi Mi Box 4 at the beginning.If you have any other suggestion to try, I would be really grateful.
i have more ideas but not sure if they will work but if you want to try them anyways:
I am closing the issue for now because of inactivity.
If this is still a problem can you provide:
Bug Report
Description of the Bug
I am using this library in a Digital Signage app to play YouTube videos and I received a bug report from one user that a video flickers on their device. I haven't managed to reproduce this bug on any of my devices yet, but I am curious whether anybody has any pointer to what could cause this problem.
Environment details
Android Version: 9
Android System WebView version: 108.0.5359.128
Tested devices:
Youtube Player Library Version: 11.0.1
Steps to reproduce the bug
Expected behavior
The YouTube video plays flicker-free
Actual behavior
The YouTube video flickers and there are following messages in the logcat:
The recording of the behavior is here: https://www.youtube.com/watch?v=-tbXBv9BEQ8
After manually pausing and resuming the video (using
YouTubePlayer.pause()
andYouTubePlayer.play()
) the video is flicker-free and playback is OK.