diff --git a/src/features/video/VideoPlayer.js b/src/features/video/VideoPlayer.js index 7309127..ef7649b 100644 --- a/src/features/video/VideoPlayer.js +++ b/src/features/video/VideoPlayer.js @@ -4,30 +4,26 @@ export default function VideoPlayer({data}) { const vid = useRef(); const aud = useRef(); - const vidPosition = useRef(0); - const audPosition = useRef(0); - let url = data.url ? data.url : null; const [playing, setPlaying] = useState(false); useEffect(() => { if (playing) { - aud.current.play(); + vid.current.play(); vid.current.currentTime = aud.current.currentTime; } else if (!playing) { - aud.current.pause(); + vid.current.pause(); } }, [playing, aud, vid]); return (