Skip to content

Commit a7b5c96

Browse files
committed
Attempt
1 parent a0f3f09 commit a7b5c96

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Sources/WebView/YouTubePlayerWebView.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,19 @@ final class YouTubePlayerWebView: WKWebView {
5656
} else {
5757
configuration.preferences.setValue(isElementFullscreenEnabled, forKey: "fullScreenEnabled")
5858
}
59+
60+
// config.mediaTypesRequiringUserActionForPlayback = []
61+
62+
// Désactiver le rendu hardware-accelerated
63+
if #available(iOS 14.0, *) {
64+
// config.preferences.setValue(false, forKey: "allowsInlineMediaPlaybackAfterFullscreen")
65+
// config.setValue(false, forKey: "allowsInlineMediaPlayback")
66+
}
67+
68+
// Forcer le rendu software
69+
configuration.preferences.setValue(false, forKey: "acceleratedDrawingEnabled")
70+
configuration.preferences.setValue(false, forKey: "canvasUsesAcceleratedDrawing")
71+
5972
return configuration
6073
}()
6174
)

0 commit comments

Comments
 (0)