diff --git a/Support/injection.js b/Support/injection.js index 15ed0989..a8334eb0 100644 --- a/Support/injection.js +++ b/Support/injection.js @@ -95,6 +95,7 @@ function fixVideoElements() { if(attributes.getNamedItem('poster')) { attributes.removeNamedItem('poster'); } + video.setAttribute('playsinline', ''); }); } diff --git a/Views/BuildingBlocks/WebView.swift b/Views/BuildingBlocks/WebView.swift index c239df23..12245073 100644 --- a/Views/BuildingBlocks/WebView.swift +++ b/Views/BuildingBlocks/WebView.swift @@ -227,6 +227,9 @@ final class WebViewConfiguration: WKWebViewConfiguration { setURLSchemeHandler(KiwixURLSchemeHandler(), forURLScheme: KiwixURLSchemeHandler.KiwixScheme) #if os(macOS) preferences.isElementFullscreenEnabled = true + #else + allowsInlineMediaPlayback = true + mediaTypesRequiringUserActionForPlayback = [] #endif userContentController = { let controller = WKUserContentController()