make sure player is paused when unmounting
This commit is contained in:
parent
e48da1ee4e
commit
27f1b4fa01
1 changed files with 1 additions and 0 deletions
|
@ -133,6 +133,7 @@ function VideoViewer(props: Props) {
|
||||||
// requireRedraw just makes it so the video component is removed from the page _by react_
|
// requireRedraw just makes it so the video component is removed from the page _by react_
|
||||||
// Then it's set to false immediately after so we can re-mount a new player
|
// Then it's set to false immediately after so we can re-mount a new player
|
||||||
setRequireRedraw(true);
|
setRequireRedraw(true);
|
||||||
|
player.pause();
|
||||||
};
|
};
|
||||||
}, [videoRef, source, contentType, setRequireRedraw, requireRedraw]);
|
}, [videoRef, source, contentType, setRequireRedraw, requireRedraw]);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue