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:
parent
c4ac6441bd
commit
7831c283a5
|
|
@ -37,6 +37,13 @@ const EmbeddableVideoPlayer = ({ videoId }: EmbeddableVideoPlayerProps) => {
|
|||
|
||||
const { data: videoResponseData } = videoResponse ?? {};
|
||||
|
||||
useEffect(() => {
|
||||
if (!videoId) {
|
||||
setVideoResponse(undefined);
|
||||
setPlaylists(undefined);
|
||||
}
|
||||
}, [videoId]);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
if (!videoId) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue