Getting a white screen when playing a html page content on ios with react native webView
See original GitHub issueHello, Actually, I’m trying to play a scorm module with react native webview package, it’s working well on android but on ios just a white screen is showing but the module is already playing and I can’t see nothing on screen.
this is my code for the web view:
<WebView ref={r => (this.webref = r)} useWebKit={false} source={{ uri: uri}} allowsInlineMediaPlayback={true} cacheEnabled={false} onError={error => { console.log("error:", error); }} onLoadStart={syntheticEvent => { // Update component to be aware of loading status const { nativeEvent } = syntheticEvent; this.setState({ loadingScrom: nativeEvent.loading }); }} onShouldStartLoadWithRequest={navState => { console.log("navState:", navState); if (navState.url) { return true; } else { this.refs[webref].stopLoading(); return false; } }} onNavigationStateChange= {navState => { console.log("navState:", navState); if (navState.url) { return true; } else { this.refs[webref].stopLoading(); return false; } }} onLoadEnd={syntheticEvent => { const { nativeEvent } = syntheticEvent; this.webref.injectJavaScript(jqueryScript); }} injectedJavaScript={injectedJavaScript} javaScriptEnabled={true} renderLoading={this.renderLoadingView} startInLoadingState={true} onMessage= {m => this.onMessage(m)} />
Environment:
- react-native version:0.59.0
- react-native-webview version:^5.12.1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7
Top GitHub Comments
same issues
Hi, @hanaechahid anaechahid,
I am working on paying scrom 1.2 content in my react native mobile app. for playing scrom content i am using webview. and Its displayed well. I am trying to integrate scrom APIs into it, but some how i got an issue while doing that. i was tried injecting javascript functions but not worked. If you have any demo code snippet, can you please share with me where i can take reference into it. It will be great help for me.
Thanks in advance