mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-22 03:27:35 +08:00
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:
committed by
Facebook Github Bot 5
parent
26d9417f2b
commit
0be6031bc6
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user