我的全屏視頻web視圖幾乎總是在打開後立即關閉,有時會起作用。幾乎每次我點擊YouTube視頻上的全屏按鈕時,您都可以看到屏幕全屏閃爍並回到原始畫面。這可能是什麼原因?爲什麼我的全屏webview在打開後不斷關閉?
該webview顯示在tablayout/viewpager設置與其他片段。
我已經使用這個代碼顯示視頻: https://github.com/cprcrack/VideoEnabledWebView
他們產生相同的行爲。
日誌時全屏失敗開放後恢復到正常的權利:當全屏成功
07-14 17:41:06.694 D/[email protected][GroupActivity]: ViewPostImeInputStage processPointer 0
07-14 17:41:06.786 D/[email protected][GroupActivity]: ViewPostImeInputStage processPointer 1
07-14 17:41:06.803 D/InputMethodManager: HSI from window - flag : 0 Pid : 6392
07-14 17:41:07.512 D/[email protected][GroupActivity]: ViewPostImeInputStage processPointer 0
07-14 17:41:07.592 D/[email protected][GroupActivity]: ViewPostImeInputStage processPointer 1
07-14 17:41:07.615 D/InputMethodManager: HSI from window - flag : 0 Pid : 6392
07-14 17:41:07.709 V/InputMethodManager: Starting input: [email protected] nm : com.linkhubapp ic=null
07-14 17:41:07.709 I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
07-14 17:41:07.713 D/InputTransport: Input channel constructed: fd=152
07-14 17:41:07.714 D/InputTransport: Input channel destroyed: fd=159
07-14 17:41:07.714 D/InputMethodManager: HSI from window - flag : 0 Pid : 6392
07-14 17:41:07.751 D/[email protected][GroupActivity]: Relayout returned: oldFrame=[0,0][1440,2560] newFrame=[0,0][1440,2560] result=0x1 surface={isValid=true -1176543232} surfaceGenerationChanged=false
07-14 17:41:07.911 D/[email protected][GroupActivity]: Relayout returned: oldFrame=[0,0][1440,2560] newFrame=[0,0][1440,2560] result=0x7 surface={isValid=true -1273339904} surfaceGenerationChanged=true
07-14 17:41:07.921 D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000, [1440x2560]-format:1
07-14 17:41:07.922 D/[email protected][GroupActivity]: mHardwareRenderer.updateSurface() mSurface={isValid=true -1273339904}
07-14 17:41:07.974 D/SurfaceView: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,875][1440,1685] result=0x7 surface={Surface(name=null)/@0xb9ffb70 isValid=true -1178691584}
07-14 17:41:08.047 D/SurfaceView: Relayout returned: oldFrame=[0,875][1440,1685] newFrame=[0,875][1440,1685] result=0x5 surface={Surface(name=null)/@0xb9ffb70 isValid=false 0}
07-14 17:41:08.095 D/InputMethodManager: HSI from window - flag : 0 Pid : 6392
07-14 17:41:08.163 D/[email protected][GroupActivity]: Relayout returned: oldFrame=[0,0][1440,2560] newFrame=[0,0][1440,2560] result=0x1 surface={isValid=true -1273339904} surfaceGenerationChanged=false
07-14 17:41:08.232 V/InputMethodManager: Starting input: [email protected] nm : com.linkhubapp ic=null
07-14 17:41:08.232 I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
07-14 17:41:08.233 D/InputTransport: Input channel constructed: fd=173
07-14 17:41:08.233 D/InputTransport: Input channel destroyed: fd=152
日誌:
07-14 17:41:27.987 D/[email protected][GroupActivity]: ViewPostImeInputStage processPointer 0
07-14 17:41:28.023 D/[email protected][GroupActivity]: ViewPostImeInputStage processPointer 1
07-14 17:41:28.048 D/InputMethodManager: HSI from window - flag : 0 Pid : 6392
07-14 17:41:28.496 D/[email protected][GroupActivity]: ViewPostImeInputStage processPointer 0
07-14 17:41:28.571 D/[email protected][GroupActivity]: ViewPostImeInputStage processPointer 1
07-14 17:41:28.616 D/InputMethodManager: HSI from window - flag : 0 Pid : 6392
07-14 17:41:28.719 V/InputMethodManager: Starting input: [email protected] nm : com.linkhubapp ic=null
07-14 17:41:28.719 I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
07-14 17:41:28.725 D/InputTransport: Input channel constructed: fd=155
07-14 17:41:28.725 D/InputTransport: Input channel destroyed: fd=173
07-14 17:41:28.725 D/InputMethodManager: HSI from window - flag : 0 Pid : 6392
07-14 17:41:28.766 D/[email protected][GroupActivity]: Relayout returned: oldFrame=[0,0][1440,2560] newFrame=[0,0][1440,2560] result=0x1 surface={isValid=true -1273339904} surfaceGenerationChanged=false
07-14 17:41:28.956 D/[email protected][GroupActivity]: Relayout returned: oldFrame=[0,0][1440,2560] newFrame=[0,0][1440,2560] result=0x1 surface={isValid=true -1273339904} surfaceGenerationChanged=false
07-14 17:41:29.036 D/SurfaceView: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,875][1440,1685] result=0x7 surface={Surface(name=null)/@0xc360d2 isValid=true -1273337856}
07-14 17:41:29.089 D/SurfaceView: Relayout returned: oldFrame=[0,875][1440,1685] newFrame=[0,875][1440,1685] result=0x1 surface={Surface(name=null)/@0xc360d2 isValid=true -1311279104}
編輯: 這似乎是在YouTube上只發生。測試Vimeo與YouTube。 Vimeo每次打開。
它發生在特定設備上還是嘗試過其他設備? –
現在它只在三星Galaxy S6上測試過。我試着在明天做一些測試。 – CantThinkOfAnything
相關:https://stackoverflow.com/questions/15768837/playing-html5-video-on-fullscreen-in-android-webview –