diff options
Diffstat (limited to 'client/src/assets/player/playlist/playlist-menu.ts')
-rw-r--r-- | client/src/assets/player/playlist/playlist-menu.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/client/src/assets/player/playlist/playlist-menu.ts b/client/src/assets/player/playlist/playlist-menu.ts index 7d7d9e12f..37284fb44 100644 --- a/client/src/assets/player/playlist/playlist-menu.ts +++ b/client/src/assets/player/playlist/playlist-menu.ts | |||
@@ -11,8 +11,18 @@ class PlaylistMenu extends Component { | |||
11 | constructor (player: videojs.Player, options?: PlaylistPluginOptions) { | 11 | constructor (player: videojs.Player, options?: PlaylistPluginOptions) { |
12 | super(player, options as any) | 12 | super(player, options as any) |
13 | 13 | ||
14 | this.player().on('userinactive', () => { | 14 | const self = this |
15 | this.close() | 15 | |
16 | function userInactiveHandler () { | ||
17 | self.close() | ||
18 | } | ||
19 | |||
20 | this.el().addEventListener('mouseenter', () => { | ||
21 | this.player().off('userinactive', userInactiveHandler) | ||
22 | }) | ||
23 | |||
24 | this.el().addEventListener('mouseleave', () => { | ||
25 | this.player().one('userinactive', userInactiveHandler) | ||
16 | }) | 26 | }) |
17 | 27 | ||
18 | this.player().on('click', event => { | 28 | this.player().on('click', event => { |