Floating video
This commit is contained in:
@@ -5,7 +5,7 @@ import API from '../API';
|
||||
import { useSnapshot } from 'valtio';
|
||||
import GlobalState from '../contexts/GlobalState.js';
|
||||
|
||||
const VideoPlayer = ({ videosFiles, postId, poster, videoUrl }) => {
|
||||
const VideoPlayer = ({ videosFiles, postId, poster, videoUrl, videoStyle }) => {
|
||||
const gState = useSnapshot(GlobalState);
|
||||
const viewer = gState.me;
|
||||
const video = React.useRef(null);
|
||||
@@ -33,11 +33,14 @@ const VideoPlayer = ({ videosFiles, postId, poster, videoUrl }) => {
|
||||
return (
|
||||
<Video
|
||||
ref={video}
|
||||
style={styles.video}
|
||||
style={{
|
||||
...styles.video,
|
||||
...videoStyle
|
||||
}}
|
||||
source={{
|
||||
uri: chosenVideo.length ? chosenVideo[chosenVideo.length-1].link : '',
|
||||
}}
|
||||
useNativeControls
|
||||
useNativeControls={false}
|
||||
shouldPlay={true}
|
||||
resizeMode="contain"
|
||||
onPlaybackStatusUpdate={status => setStatus(() => status)}
|
||||
|
||||
Reference in New Issue
Block a user