Fix PiP not dismissing on iOS (#168)
Reload webview when dispoing video
This commit is contained in:
parent
9b4b34f647
commit
43d55c785b
1 changed files with 4 additions and 1 deletions
|
|
@ -285,7 +285,10 @@ abstract class VideoStoreBase with Store {
|
|||
|
||||
@action
|
||||
void dispose() {
|
||||
controller?.runJavascript('document.getElementsByTagName("video")[0].pause();');
|
||||
// Not ideal, but seems like the only way of disposing of the video properly.
|
||||
// Will both prevent the video from continuing to play when dismissed and closes PiP on iOS.
|
||||
controller?.reload();
|
||||
|
||||
_disposeOverlayReaction();
|
||||
floating.dispose();
|
||||
sleepTimer?.cancel();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue