google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.34k stars 593 forks source link

[WebView] Full screen video playback #1702

Closed diegum closed 11 months ago

diegum commented 11 months ago

Description When starting to play a video embedded on a web page, tapping on the video full screen widget won't act. All the rest of the expected video playback experience are OK (e.g., pause, seek, mute, change resolution, etc.)

Steps to reproduce

  1. Run any of the three Accompanist WebView samples.
  2. Make sure that a page holding at least one video is loaded. For example, https://www.youtube.com.
  3. Start playing the video.
  4. Tap on the full-screen button (typically, at the bottom right of the video box.)

Expected behavior

  1. The video starts playing in full-screen until you tap the same button again.
  2. Changing the device orientation, while in full screen, does reorient the full-screen video as well.

Additional context I found examples using the original android.widget.View-based UI framework. Instead of AccompanistWebChromeClient, these examples use its superclass WebChromeClient. But these old samples (this one, for example) depend on deprecated APIs like System UI Visibility, Window, etc. I couldn't adapt the approach to AccompanistWebChromeClient provided that some functions like getWindow() (or its property-like version window) are simply missing.

bentrengrove commented 11 months ago

Unfortunately Accompanist WebView has been deprecated and won't be supported going forwards. I am closing this issue. We recommend you fork the implemenation here and customise it to your needs. For more information please see our update blog

diegum commented 11 months ago

Makes sense to me, Ben. Thanks for the clarifying blog post.