cprcrack / VideoEnabledWebView

Android's WebView and WebChromeClient class extensions that enable fully working HTML5 video support
MIT License
1.05k stars 289 forks source link

Problem when setting android:windowIsTranslucent = true #2

Open VinhTranVN opened 10 years ago

VinhTranVN commented 10 years ago

Thanks for your code very much, I try to implement this code in my project, everything work fine with android:windowIsTranslucent is false. Because in my project used SwipeBackLayout, therefore I must set android:windowIsTranslucent = true in my style and i got a problem as below: when i touch fullscreen, after 2~5 seconds, the video will be transparent and i can't see anything, only hear the sound of that video. I touch into the video again, the video will be visible again but after 2~5 seconds, it will occur above problem. Do you have any suggest to fix this bug?

Thank you.

cprcrack commented 10 years ago

To be honest I have never tried setting android:windowIsTranslucent to true, but the issue could be related to the inner VideoView/VideoSurfaceView/VideoTextureView that renders the video. You could try accessing the inner views responsible of showing the video via reflection and forcing the relevant view to be focused or something like that...

VinhTranVN commented 9 years ago

More info about this bug, i test on my device LG optimus G, 4.1.2 _ if i setting hardwareAccelarated = true:

_ if i setting hardwareAccelarated = false: