diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-18 14:35:31 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-18 14:35:31 +0200 |
commit | c199c427d4ae586339822320f20f512a7a19dc3f (patch) | |
tree | 9cbe8bebc25e97d2e8086c41bcd7180dd752dbac /client/src/assets/player/resolution-menu-item.ts | |
parent | cdf4cb9eaf5f6bc71f7c1e1963c07575f1d2593d (diff) | |
download | PeerTube-c199c427d4ae586339822320f20f512a7a19dc3f.tar.gz PeerTube-c199c427d4ae586339822320f20f512a7a19dc3f.tar.zst PeerTube-c199c427d4ae586339822320f20f512a7a19dc3f.zip |
Better typings
Diffstat (limited to 'client/src/assets/player/resolution-menu-item.ts')
-rw-r--r-- | client/src/assets/player/resolution-menu-item.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/assets/player/resolution-menu-item.ts b/client/src/assets/player/resolution-menu-item.ts index afe490abb..b54fd91ef 100644 --- a/client/src/assets/player/resolution-menu-item.ts +++ b/client/src/assets/player/resolution-menu-item.ts | |||
@@ -1,9 +1,13 @@ | |||
1 | // FIXME: something weird with our path definition in tsconfig and typings | ||
2 | // @ts-ignore | ||
3 | import { Player } from 'video.js' | ||
4 | |||
1 | import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' | 5 | import { VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' |
2 | 6 | ||
3 | const MenuItem: VideoJSComponentInterface = videojsUntyped.getComponent('MenuItem') | 7 | const MenuItem: VideoJSComponentInterface = videojsUntyped.getComponent('MenuItem') |
4 | class ResolutionMenuItem extends MenuItem { | 8 | class ResolutionMenuItem extends MenuItem { |
5 | 9 | ||
6 | constructor (player: any, options: any) { | 10 | constructor (player: Player, options: any) { |
7 | const currentResolutionId = player.peertube().getCurrentResolutionId() | 11 | const currentResolutionId = player.peertube().getCurrentResolutionId() |
8 | options.selectable = true | 12 | options.selectable = true |
9 | options.selected = options.id === currentResolutionId | 13 | options.selected = options.id === currentResolutionId |