From 923bbabd3af1e1a958d58b1cef5489d3575f47d1 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Sun, 11 Dec 2022 23:22:05 -0500 Subject: [PATCH] Requires click to start hsl videos --- components/Media.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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 ?