问题描述
如何仅使用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 (将#修改为@)