This would implement Android PiP mode and connect the new `onPipModeChanged` API. It is helpful for the webcompat team to be able to test interventions in GVE where they already do the rest of the testing.
Bug 1969492 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
This would implement Android PiP mode and connect the new `onPipModeChanged` API. It would be helpful for the webcompat team to be able to test [WebCompat interventions][3] in GVE where they already do the rest of the testing. In Android Components (AC; the code layer that consumes GeckoView), we have [an implementation of picture-in-picture][0] that is used across Fenix, Focus, and [Reference Browser][1]. This works well for us in most cases. Another important GeckoView consumer is GeckoView Example (GVE) that cannot make use of the `PictureInPictureFeature` so we would have to upstream the logic from AC into GVE so that we enable the system feature and notify the [`GeckoSession.onPipModeChanged`][2]. --- For this work, it would be good to look at how PiP is implemented in Reference Browser (least complex implementation), identify the equivalent APIs (e.g. choosing the selected GeckoSession is different in Fenix/Focus), and pick out the most important parts that are needed to enable PiP in GVE. [0]: https://searchfox.org/mozilla-mobile/source/firefox-android/android-components/components/feature/session/src/main/java/mozilla/components/feature/session/PictureInPictureFeature.kt [1]: https://github.com/mozilla-mobile/reference-browser/ [2]: https://searchfox.org/mozilla-central/rev/043d59a948b9428685118b2d6f756658456577ec/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/CompositorController.java#89 [3]: https://wiki.mozilla.org/Compatibility/WebCompat_Interventions