Closed jwinarske closed 6 months ago
Unfortunately, it's not possible to destroy anything on exit from the plugin. MPV is an external process, which Flutter doesn't kill it when it exits, and the plugin is not offered any sort of "before-the-program-exits" hook to use.
This will have to be worked around in the app by using something like window_manager
to tell the player to stop when the app closes.
In the case of Linux when you spawn a process you can store the process id, which you can use later to issue kill -9 <pid>
. It's a minor implementation detail.
Player should be destroyed on exit.