PuntitOwO / simple_pip_mode_flutter

A complete Picture-In-Picture mode plugin for android. Provides methods to check feature availability, enter PIP mode and callbacks.
MIT License
16 stars 23 forks source link

Add ability to disable auto pip mode #7

Closed tommyxchow closed 1 month ago

tommyxchow commented 1 year ago

First of all, thank you for the awesome package! Best implementation of PiP for Flutter/Android I've seen so far.

One issue I came across was there isn't a way to globally disable autoEnter (setAutoEnterEnabled). This meant that once I called setAutoPipMode, auto PiP would be enabled for the rest of the app's lifetime. As a result, the entire app goes into PiP mode from any screen when leaving the app.

In this PR, I've simply modified setAutoPipMode to allow the autoEnter parameter to be passed, just like how it is in enterPipMode. May not be the best solution, but it was the first one I could think of.

PuntitOwO commented 1 month ago

Already done 👍🏻