2

I want to show video in HTML component, but when I pass a string

let body = '<video src="https://www.youtube.com/watch?v=vJJpnplTBeM" poster="https://img.youtube.com/vi/vJJpnplTBeM/maxresdefault.jpg"></video>';

to the component

return (<ScrollView>
    <Html body={body} style={{}}/>
</ScrollView>);

it show an error No suitable image URL loader found for (null).

How to correctly pass video into Shoutem HTML Component?

Evgeniy
  • 3,219
  • 5
  • 25
  • 40

1 Answers1

0

Shoutem's video component does what you're trying to do, you could simply use it instead.

<Video
  source={{ uri: 'https://www.youtube.com/watch?v=myvideo' }}
  poster={'https://mypic.png'}
  height={200}
  width={300}
/>