improve video
This commit is contained in:
@@ -45,9 +45,10 @@ let Media = (props) => {
|
||||
useEffect(async () => {
|
||||
if (!videosId[1]) return 0;
|
||||
let videoObj = await API.getVideo(videosId[1]);
|
||||
setVideosFiles(videoObj.files || []);
|
||||
if(videoObj && videoObj.files)
|
||||
setVideosFiles(videoObj.files);
|
||||
}, [props.content])
|
||||
const video = videosFiles.length ? <VideoPlayer videosFiles={videosFiles} /> :
|
||||
const video = videosFiles.length ? <VideoPlayer videosFiles={videosFiles} videoId={videosId[1]} /> :
|
||||
(videosId.length ? <VimeoPlayer videoId={videosId[1]} /> : <></>);
|
||||
const iframe = iframeSrc.length ?
|
||||
<WebView
|
||||
|
||||
Reference in New Issue
Block a user