Seek to correct location on close and reopen video

When closing and reopening a video, the video would start at the previous
progress point. Now it will correctly seek to the last progress point at close.
This commit is contained in:
Caleb Rogers 2026-06-18 11:56:35 +02:00
parent c4ac6441bd
commit 7831c283a5
1 changed files with 7 additions and 0 deletions

View File

@ -37,6 +37,13 @@ const EmbeddableVideoPlayer = ({ videoId }: EmbeddableVideoPlayerProps) => {
const { data: videoResponseData } = videoResponse ?? {};
useEffect(() => {
if (!videoId) {
setVideoResponse(undefined);
setPlaylists(undefined);
}
}, [videoId]);
useEffect(() => {
(async () => {
if (!videoId) {