mirror of
https://github.com/haiwen/seahub.git
synced 2025-10-22 11:43:33 +00:00
defer player dispose to avoid dom conflicts (#8255)
Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
@@ -32,9 +32,15 @@ class VideoPlayer extends React.Component {
|
||||
|
||||
// destroy player on unmount
|
||||
componentWillUnmount() {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
if (this.player) {
|
||||
this.player.dispose();
|
||||
}
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// wrap the player in a div with a `data-vjs-player` attribute
|
||||
|
Reference in New Issue
Block a user