Browse Source

stop media playback if wbxdc is closed

cyberta 3 years ago
parent
commit
0e66a40e74
1 changed files with 7 additions and 0 deletions
  1. 7 0
      deltachat-ios/Controller/WebxdcViewController.swift

+ 7 - 0
deltachat-ios/Controller/WebxdcViewController.swift

@@ -184,6 +184,13 @@ class WebxdcViewController: WebViewViewController {
         loadHtml()
     }
     
+    override func viewDidDisappear(_ animated: Bool) {
+        super.viewDidDisappear(animated)
+        if #available(iOS 15.0, *) {
+            webView.pauseAllMediaPlayback()
+        }
+    }
+
     
     private func loadRestrictedHtml() {
         // TODO: compile only once