Floating video

This commit is contained in:
Adolfo Reyna
2023-01-08 22:15:43 -05:00
parent caf2a8ee04
commit 05d05f79f7
6 changed files with 140 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ import API from './../API.js';
import VideoPlayer from './VideoPlayer.js';
import VimeoPlayer from './VimeoPlayer.js';
import { WebView } from 'react-native-webview';
import GlobalState from '../contexts/GlobalState.js';
const videoIdF = (content) => {
let vimeoTag = content.match(/@vimeo:[0-9]+/);
@@ -89,7 +90,10 @@ let Media = (props) => {
const video2 = hlsUrl ? (
loaded ?
<VideoPlayer videoUrl={hlsUrl} postId={props.postId} /> :
<TouchableHighlight onPress={() => setLoaded(true)}>
<TouchableHighlight onPress={() => {
//setLoaded(true)
GlobalState.currentMedia = hlsUrl;
}}>
{poster ?
<Image source={poster ? { uri: poster } : {}} key={poster} style={styles.poster} /> :
<Button