mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Stop media playback when article will disappear
This commit is contained in:
@@ -123,6 +123,12 @@ class WebViewController: UIViewController {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
|
||||
stopMediaPlayback()
|
||||
}
|
||||
|
||||
// MARK: Notifications
|
||||
|
||||
@@ -526,6 +532,10 @@ private extension WebViewController {
|
||||
coordinator.showFullScreenImage(image: image, imageTitle: clickMessage.imageTitle, transitioningDelegate: self)
|
||||
}
|
||||
}
|
||||
|
||||
func stopMediaPlayback() {
|
||||
webView?.evaluateJavaScript("stopMediaPlayback();")
|
||||
}
|
||||
|
||||
func configureTopShowBarsView() {
|
||||
topShowBarsView = UIView()
|
||||
|
||||
Reference in New Issue
Block a user