Added mediaPlaybackRequiresUserAction to WebView

Summary:Just added a pass through to the `WebView` for `mediaPlaybackRequiresUserAction` and `setMediaPlaybackRequiresUserGesture` to allow auto-playing audio and video elements
Closes https://github.com/facebook/react-native/pull/5956

Differential Revision: D3053554

Pulled By: mkonicek

fb-gh-sync-id: a1f362c1551de1a0218f5d23c70668e4c8078993
shipit-source-id: a1f362c1551de1a0218f5d23c70668e4c8078993
This commit is contained in:
Thomas Beverley
2016-03-16 10:02:09 -07:00
committed by Facebook Github Bot 5
parent 26d9417f2b
commit 0be6031bc6
4 changed files with 22 additions and 0 deletions

View File

@@ -137,6 +137,12 @@ var WebView = React.createClass({
* Used to locate this view in end-to-end tests.
*/
testID: PropTypes.string,
/**
* Determines whether HTML5 audio & videos require the user to tap before they can
* start playing. The default value is `false`.
*/
mediaPlaybackRequiresUserAction: PropTypes.bool,
},
getInitialState: function() {
@@ -212,6 +218,7 @@ var WebView = React.createClass({
onLoadingFinish={this.onLoadingFinish}
onLoadingError={this.onLoadingError}
testID={this.props.testID}
mediaPlaybackRequiresUserAction={this.props.mediaPlaybackRequiresUserAction}
/>;
return (