fix linting errors
This commit is contained in:
parent
ee28648852
commit
52f883be4e
1 changed files with 10 additions and 10 deletions
|
@ -376,9 +376,6 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||||
displayCurrentQuality: true,
|
displayCurrentQuality: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add reference to player to global scope
|
|
||||||
window.player = player;
|
|
||||||
|
|
||||||
// fixes #3498 (https://github.com/lbryio/lbry-desktop/issues/3498)
|
// fixes #3498 (https://github.com/lbryio/lbry-desktop/issues/3498)
|
||||||
// summary: on firefox the focus would stick to the fullscreen button which caused buggy behavior with spacebar
|
// summary: on firefox the focus would stick to the fullscreen button which caused buggy behavior with spacebar
|
||||||
player.on('fullscreenchange', () => document.activeElement && document.activeElement.blur());
|
player.on('fullscreenchange', () => document.activeElement && document.activeElement.blur());
|
||||||
|
@ -391,6 +388,9 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||||
const vjsElement = createVideoPlayerDOM(containerRef.current);
|
const vjsElement = createVideoPlayerDOM(containerRef.current);
|
||||||
const vjsPlayer = initializeVideoPlayer(vjsElement);
|
const vjsPlayer = initializeVideoPlayer(vjsElement);
|
||||||
|
|
||||||
|
// Add reference to player to global scope
|
||||||
|
window.player = vjsPlayer;
|
||||||
|
|
||||||
// Add event listener for keyboard shortcuts
|
// Add event listener for keyboard shortcuts
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
||||||
player.dispose();
|
player.dispose();
|
||||||
window.player = undefined;
|
window.player = undefined;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Update video player and reload when source URL changes
|
// Update video player and reload when source URL changes
|
||||||
|
|
Loading…
Reference in a new issue