如何解决在react-native-video播放器中播放React Native Webview视频
如何仅使用react-native-video播放视频?我可以从react-native-webview获取视频URL。但是,当我单击webview内的媒体URL时,它同时使用react-native-video和react-native-webview默认播放器进行播放。如何防止使用react-native-webview默认播放器?
我的webview代码是:
<WebView
userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/78.0.3904.97 Safari/537.36"
onLoadStart={() => this.onPageLoadStart()}
onLoadEnd={() => this.onPageLoadEnd()}
onError={() => this.handleNetworkError()}
onMessage={this.onWebViewMessage}
source={{
uri: this.state.url
}}
ref={(webView) => this.webView.ref = webView}
style={{ height: this.state.scrollViewHeight,width: this.state.scrollViewWidth }}
onNavigationStateChange={this.navigationStateChangedHandler.bind(this)}
javaScriptEnabled={true}
sharedCookiesEnabled={true}
domStorageEnabled={true}
thirdPartyCookiesEnabled={true}
mediaPlaybackRequiresUserAction={true} />
谢谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。