You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/11/01 00:44:01 UTC
[41/50] ios commit: CB-7047 - Support config.xml preferences for
WKWebView
CB-7047 - Support config.xml preferences for WKWebView
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/d801baca
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/d801baca
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/d801baca
Branch: refs/heads/wkwebview
Commit: d801bacac2a41ff730bd8aa6967004ea6bf3f82b
Parents: 686ef8a
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Jul 21 14:34:05 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Oct 31 15:37:43 2014 -0700
----------------------------------------------------------------------
CordovaLib/Classes/CDVWebViewPreferences.m | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d801baca/CordovaLib/Classes/CDVWebViewPreferences.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWebViewPreferences.m b/CordovaLib/Classes/CDVWebViewPreferences.m
index a42b3aa..55f447b 100644
--- a/CordovaLib/Classes/CDVWebViewPreferences.m
+++ b/CordovaLib/Classes/CDVWebViewPreferences.m
@@ -242,6 +242,27 @@
}
theWebView.configuration.preferences.minimumFontSize = minimumFontSize;
+ BOOL allowInlineMediaPlayback = NO; // default
+ prefObj = [self cordovaSettings:settings forKey:@"AllowInlineMediaPlayback"];
+ if (prefObj != nil) {
+ allowInlineMediaPlayback = [(NSNumber*)prefObj boolValue];
+ }
+ theWebView.configuration.allowsInlineMediaPlayback = allowInlineMediaPlayback;
+
+ BOOL mediaPlaybackRequiresUserAction = YES; // default
+ prefObj = [self cordovaSettings:settings forKey:@"MediaPlaybackRequiresUserAction"];
+ if (prefObj != nil) {
+ mediaPlaybackRequiresUserAction = [(NSNumber*)prefObj boolValue];
+ }
+ theWebView.configuration.mediaPlaybackRequiresUserAction = mediaPlaybackRequiresUserAction;
+
+ BOOL suppressesIncrementalRendering = NO; // default
+ prefObj = [self cordovaSettings:settings forKey:@"MediaPlaybackRequiresUserAction"];
+ if (prefObj != nil) {
+ suppressesIncrementalRendering = [(NSNumber*)prefObj boolValue];
+ }
+ theWebView.configuration.suppressesIncrementalRendering = suppressesIncrementalRendering;
+
/*
BOOL javaScriptEnabled = YES; // default value
if ([self cordovaSettings:settings forKey:@"JavaScriptEnabled"]) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org