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,
|
||||
});
|
||||
|
||||
// Add reference to player to global scope
|
||||
window.player = player;
|
||||
|
||||
// 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
|
||||
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 vjsPlayer = initializeVideoPlayer(vjsElement);
|
||||
|
||||
// Add reference to player to global scope
|
||||
window.player = vjsPlayer;
|
||||
|
||||
// Add event listener for keyboard shortcuts
|
||||
window.addEventListener('keydown', handleKeyDown);
|
||||
|
||||
|
@ -402,7 +402,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
|
|||
player.dispose();
|
||||
window.player = undefined;
|
||||
}
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
// Update video player and reload when source URL changes
|
||||
|
|
Loading…
Reference in a new issue