如何在react-native-WKWebView中使用道具allowInlineMediaPlayback?

我在ios中使用WKWebview作为我的React Native项目。我的项目要求是默认情况下禁用全屏显示的vidoe。在UIWebView中,可以通过将propsallowInlineMediaPlayback设置为true来完成,但是WKWebview不支持此prop。还有什么其他方法可以将此道具设置为禁用Webview中的全屏视频?

<WKWebView
source={{
uri: "videocheck/02_1.2_Objectives_in_financial_management.html"
}}
ref={webView => (this.webView = webView)}
originWhitelist={'["*"]'}
javaScriptEnabled={true}
domStorageEnabled={true}
startInLoadingState={true}
useWebKit={true}
//scalesPageToFit={true}
scrollEnabled={false}
// onLoad={() => this.sendPostMessage()}
allowFileaccess={true}
allowUniversalaccessFromFileURLs={true}
allowFileaccessFromFileURLs={true}
allowsInlineMediaPlayback={true}
mediaPlaybackRequiresUseraction={true}
/>
ly620ay 回答:如何在react-native-WKWebView中使用道具allowInlineMediaPlayback?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3140179.html

大家都在问