diff --git a/components/Media.js b/components/Media.js index 4ba22e3..2857eb3 100644 --- a/components/Media.js +++ b/components/Media.js @@ -1,5 +1,6 @@ import React, { useState, useEffect } from 'react'; -import { Text, View, TouchableHighlight, Image, StyleSheet, FlatList } from 'react-native'; +import { View, TouchableHighlight, Image, StyleSheet, FlatList } from 'react-native'; +import { Button } from 'react-native-paper'; import API from './../API.js'; import VideoPlayer from './VideoPlayer.js'; import VimeoPlayer from './VimeoPlayer.js'; @@ -77,7 +78,20 @@ let Media = (props) => { ) ) : (videosId.length ? : <>); - const video2 = hlsUrl ? : <>; + const video2 = hlsUrl ? ( + loaded ? + : + setLoaded(true)}> + {poster ? + : + + } + + ): <>; const iframe = iframeSrc.length ?