Commit dda19722 authored by michaeldo's avatar michaeldo Committed by Commit bot

Allow html5 videos to be played inline.

Enable inline video playback on iOS10 or greater.

BUG=395206

Review-Url: https://codereview.chromium.org/2265653002
Cr-Commit-Position: refs/heads/master@{#413457}
parent c1d960f8
...@@ -71,6 +71,9 @@ WKWebViewConfigurationProvider::GetWebViewConfiguration() { ...@@ -71,6 +71,9 @@ WKWebViewConfigurationProvider::GetWebViewConfiguration() {
WKDataDetectorTypePhoneNumber]; WKDataDetectorTypePhoneNumber];
} }
#endif #endif
// API available on iOS 9, although doesn't appear to enable inline playback
// Works as intended on iOS 10+
[configuration_ setAllowsInlineMediaPlayback:YES];
// setJavaScriptCanOpenWindowsAutomatically is required to support popups. // setJavaScriptCanOpenWindowsAutomatically is required to support popups.
[[configuration_ preferences] setJavaScriptCanOpenWindowsAutomatically:YES]; [[configuration_ preferences] setJavaScriptCanOpenWindowsAutomatically:YES];
[[configuration_ userContentController] [[configuration_ userContentController]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment