floating icon indicating copy to clipboard operation
floating copied to clipboard

Implementing automatic pip mode

Open hep-mh opened this issue 1 year ago • 0 comments

Implementation of two new functions Floating.toggleAutoPip and Floating.isAutoPipAvailable, the first of which explicitly calls setAutoEnterEnabled on the Android side. This way, the user can toggle automatic PiP mode on with Floating.toggleAutoPip(autoEnter: true) or off with Floating.toggleAutoPip(autoEnter: false), depending on the current state of the app. Just like Floating.enable, Floating.toggleAutoPip takes aspectRatioand sourceRectHintas additional parameters.

However, this additional functionality somewhat breaks the implementation of PiPStatus, since PiP can be entered automatically, without calling Floating.enable. Maybe, one should also implement PipStatus.automatic?

hep-mh avatar Apr 25 '23 15:04 hep-mh