spot: fix autoplay check

This commit is contained in:
nick-delirium 2024-09-11 17:10:22 +02:00
parent 5f899a5ee4
commit b0a1ca1d75
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -105,6 +105,7 @@ function SpotVideoContainer({
videoRef.current.src = ''; videoRef.current.src = '';
setTimeout(() => { setTimeout(() => {
videoRef.current!.src = videoURL; videoRef.current!.src = videoURL;
startPlaying();
}, 0); }, 0);
} }
@ -117,8 +118,6 @@ function SpotVideoContainer({
}); });
}; };
check(); check();
videoRef.current.src = videoURL;
startPlaying();
} }
} else if (streamFile && videoRef.current && videoRef.current.canPlayType('application/vnd.apple.mpegurl')) { } else if (streamFile && videoRef.current && videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
setLoaded(true); setLoaded(true);
@ -224,7 +223,7 @@ function SpotVideoContainer({
width={75} width={75}
className="mb-5" className="mb-5"
/> />
<div className={'text-2xl font-bold'}>Loading Spot Recording</div> <div className={'text-2xl font-bold'}>Loading Spot Recording...</div>
</div> </div>
)} )}
<video <video