cprcrack / VideoEnabledWebView

Android's WebView and WebChromeClient class extensions that enable fully working HTML5 video support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem when setting android:windowIsTranslucent = true

VinhTranVN opened this issue · comments

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

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

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

  • play video at mode non-fullscreen -> OK
  • play video at mode fullscreen -> can't see video after the video controller was hidden

_ if i setting hardwareAccelarated = false:

  • play video at mode non-fullscreen -> can not play video
  • play video at mode fullscreen -> OK