Skip to content

Commit f1a5514

Browse files
committed
mediaPlaybackRequiresUserAction property
1 parent d06e80d commit f1a5514

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ios/RCTWebViewBridge.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ - (instancetype)initWithFrame:(CGRect)frame
6464
_contentInset = UIEdgeInsetsZero;
6565
_webView = [[UIWebView alloc] initWithFrame:self.bounds];
6666
_webView.delegate = self;
67+
_webView.mediaPlaybackRequiresUserAction = NO;
6768
[self addSubview:_webView];
6869
}
6970
return self;

ios/RCTWebViewBridgeManager.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ - (UIView *)view
4949
RCT_EXPORT_VIEW_PROPERTY(onLoadingError, RCTDirectEventBlock)
5050
RCT_EXPORT_VIEW_PROPERTY(onShouldStartLoadWithRequest, RCTDirectEventBlock)
5151
RCT_REMAP_VIEW_PROPERTY(allowsInlineMediaPlayback, _webView.allowsInlineMediaPlayback, BOOL)
52+
RCT_REMAP_VIEW_PROPERTY(mediaPlaybackRequiresUserAction, _webView.mediaPlaybackRequiresUserAction, BOOL)
5253
RCT_EXPORT_VIEW_PROPERTY(onBridgeMessage, RCTDirectEventBlock)
5354

5455
- (NSDictionary<NSString *, id> *)constantsToExport

0 commit comments

Comments
 (0)