vjs: Fix 'Video showing previous audio clip's thumbnail instead'
## Issue 5450: Video showing previous audio clip's thumbnail instead ## Notes `createVideoPlayerDOM` depends on `isAudio`
This commit is contained in:
parent
9ce6ecc923
commit
09c1cfeb8f
1 changed files with 2 additions and 2 deletions
|
@ -452,7 +452,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
return vjs;
|
||||
}
|
||||
|
||||
// This lifecycle hook is only called once (on mount)
|
||||
// This lifecycle hook is only called once (on mount), or when `isAudio` changes.
|
||||
useEffect(() => {
|
||||
const vjsElement = createVideoPlayerDOM(containerRef.current);
|
||||
const vjsPlayer = initializeVideoPlayer(vjsElement);
|
||||
|
@ -476,7 +476,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
player.dispose();
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
}, [isAudio]);
|
||||
|
||||
// Update video player and reload when source URL changes
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue