Skip to content

Commit

Permalink
Merge pull request #936 from kiwix/933-iphone-video-starts-in-full-sc…
Browse files Browse the repository at this point in the history
…reen

933 iphone video starts in full screen
  • Loading branch information
kelson42 authored Aug 19, 2024
2 parents 18acd0b + 986785b commit 52a74c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Support/injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function fixVideoElements() {
if(attributes.getNamedItem('poster')) {
attributes.removeNamedItem('poster');
}
video.setAttribute('playsinline', '');
});
}

Expand Down
3 changes: 3 additions & 0 deletions Views/BuildingBlocks/WebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 52a74c9

Please sign in to comment.