Disallow automatic playback for all media types.

This commit is contained in:
Brent Simmons 2024-02-27 20:28:14 -08:00
parent 565b3ac2c3
commit d90e59439d

View File

@ -98,6 +98,7 @@ final class DetailWebViewController: NSViewController {
configuration.preferences = preferences configuration.preferences = preferences
configuration.defaultWebpagePreferences.allowsContentJavaScript = AppDefaults.shared.isArticleContentJavascriptEnabled configuration.defaultWebpagePreferences.allowsContentJavaScript = AppDefaults.shared.isArticleContentJavascriptEnabled
configuration.setURLSchemeHandler(detailIconSchemeHandler, forURLScheme: ArticleRenderer.imageIconScheme) configuration.setURLSchemeHandler(detailIconSchemeHandler, forURLScheme: ArticleRenderer.imageIconScheme)
configuration.mediaTypesRequiringUserActionForPlayback = .all
let userContentController = WKUserContentController() let userContentController = WKUserContentController()
userContentController.add(self, name: MessageName.windowDidScroll) userContentController.add(self, name: MessageName.windowDidScroll)