question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting a white screen when playing a html page content on ios with react native webView

See original GitHub issue

Hello, 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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

2reactions
dsky1990commented, Sep 25, 2019

same issues

1reaction
sachinkhedkarcommented, Apr 22, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

IOS WebView White Screen Issue #2302 - GitHub
When the screen is scrolled, the screen appears normally. If the height of the WebView is set to a value other than 100%,...
Read more >
White blank screen when load website WebView React Native
For me it worked by passing it precise values for width and height for Webview component and not percentage values.
Read more >
'react-native-webview' White screen on web : r/reactnative
I am having a white screen and when I look on the html, there's no "iframe" or "webview" showing. import React from 'react';...
Read more >
Why the Blank Expression? Solution to App White-screen ...
Generally, a white screen is displayed before the DOM Render step. Users can only browse the full web page after downloading the rendered...
Read more >
HTML Video element, not working after iosSafari15 update
all i can see is white blank background instead of background video. it looks like video cannot be loaded or played. html: <video...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found