Title: [236548] trunk/Tools
- Revision
- 236548
- Author
- [email protected]
- Date
- 2018-09-27 09:08:49 -0700 (Thu, 27 Sep 2018)
Log Message
Enable getUserMedia in mini browser
https://bugs.webkit.org/show_bug.cgi?id=190012
Reviewed by Eric Carlson.
Enable MediaDevices and mock capture devices.
Grant mock devices access to any getUserMedia call.
Covered by manual testing.
* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[WK2BrowserWindowController _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (236547 => 236548)
--- trunk/Tools/ChangeLog 2018-09-27 16:03:48 UTC (rev 236547)
+++ trunk/Tools/ChangeLog 2018-09-27 16:08:49 UTC (rev 236548)
@@ -1,3 +1,20 @@
+2018-09-27 Youenn Fablet <[email protected]>
+
+ Enable getUserMedia in mini browser
+ https://bugs.webkit.org/show_bug.cgi?id=190012
+
+ Reviewed by Eric Carlson.
+
+ Enable MediaDevices and mock capture devices.
+ Grant mock devices access to any getUserMedia call.
+ Covered by manual testing.
+
+ * MiniBrowser/mac/AppDelegate.m:
+ (defaultConfiguration):
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
+ (-[WK2BrowserWindowController _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
+
2018-09-27 Antoine Quint <[email protected]>
[Web Animations] Turn Web Animations with CSS integration on
Modified: trunk/Tools/MiniBrowser/mac/AppDelegate.m (236547 => 236548)
--- trunk/Tools/MiniBrowser/mac/AppDelegate.m 2018-09-27 16:03:48 UTC (rev 236547)
+++ trunk/Tools/MiniBrowser/mac/AppDelegate.m 2018-09-27 16:08:49 UTC (rev 236548)
@@ -94,6 +94,8 @@
configuration = [[WKWebViewConfiguration alloc] init];
configuration.preferences._fullScreenEnabled = YES;
configuration.preferences._developerExtrasEnabled = YES;
+ configuration.preferences._mediaDevicesEnabled = YES;
+ configuration.preferences._mockCaptureDevicesEnabled = YES;
_WKProcessPoolConfiguration *processConfiguration = [[[_WKProcessPoolConfiguration alloc] init] autorelease];
processConfiguration.diskCacheSpeculativeValidationEnabled = ![SettingsController shared].networkCacheSpeculativeRevalidationDisabled;
Modified: trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (236547 => 236548)
--- trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m 2018-09-27 16:03:48 UTC (rev 236547)
+++ trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m 2018-09-27 16:08:49 UTC (rev 236548)
@@ -795,6 +795,16 @@
{
}
+- (void)_webView:(WKWebView *)webView requestUserMediaAuthorizationForDevices:(_WKCaptureDevices)devices url:(NSURL *)url mainFrameURL:(NSURL *)mainFrameURL decisionHandler:(void (^)(BOOL authorized))decisionHandler
+{
+ decisionHandler(true);
+}
+
+- (void)_webView:(WKWebView *)webView checkUserMediaPermissionForURL:(NSURL *)url mainFrameURL:(NSURL *)mainFrameURL frameIdentifier:(NSUInteger)frameIdentifier decisionHandler:(void (^)(NSString *salt, BOOL authorized))decisionHandler
+{
+ decisionHandler(@"", false);
+}
+
@end
#endif // WK_API_ENABLED
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes