Why is this Web View not loading in Snack for React Native

I have this following Html that i am trying to load to a web view but it is not loading in Snack only white screen + no error

import * as React from 'react';
import { renderToString } from 'react-dom/server'
import { WebView } from 'react-native-webview';
import { View, Text } from "react-native";
import Component from './ReactComp';
import PlyrComponent from './PlyrComponent';

export default class App extends React.Component {

  initialHTMLContent = `
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="author" content="">
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <script src='https://unpkg.com/rahulrsingh09-stenciltest2@0.0.3/dist/test/test.js'></script>

<my-component source-url="https://fcc3ddae59ed.us-west-2.playback.live-video.net/api/video/v1/us-west-2.893648527354.channel.DmumNckWFTqz.m3u8"></my-component>



  render() {
    return (
        flex: 1,
         source={{html: this.initialHTMLContent, baseUrl: null}}
        // source={{uri : 'https://www.twitch.tv/videos/721473497'}}

https://snack.expo.io/@rahulrsingh09/webview-example. The Html Loads standalone when saved as .html file

The following snack works for me:

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.