diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-17 11:20:12 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-04-17 14:12:43 +0200 |
commit | 7e37e111116e41530749b88327bc601cb39ade03 (patch) | |
tree | a141a84b6999029084629d45a3d5addbfa34e603 /client/src/assets/player/videojs-components | |
parent | bb3933ef370c46be6090e4e522c6e3f5b7144f4c (diff) | |
download | PeerTube-7e37e111116e41530749b88327bc601cb39ade03.tar.gz PeerTube-7e37e111116e41530749b88327bc601cb39ade03.tar.zst PeerTube-7e37e111116e41530749b88327bc601cb39ade03.zip |
Fix videojs typings
Diffstat (limited to 'client/src/assets/player/videojs-components')
12 files changed, 23 insertions, 23 deletions
diff --git a/client/src/assets/player/videojs-components/next-video-button.ts b/client/src/assets/player/videojs-components/next-video-button.ts index bdb245dcc..c97ecdda6 100644 --- a/client/src/assets/player/videojs-components/next-video-button.ts +++ b/client/src/assets/player/videojs-components/next-video-button.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs, { VideoJsPlayer } from 'video.js' | 1 | import videojs from 'video.js/dist/alt/video.core.js' |
2 | 2 | ||
3 | const Button = videojs.getComponent('Button') | 3 | const Button = videojs.getComponent('Button') |
4 | 4 | ||
@@ -9,7 +9,7 @@ export interface NextVideoButtonOptions extends videojs.ComponentOptions { | |||
9 | class NextVideoButton extends Button { | 9 | class NextVideoButton extends Button { |
10 | private readonly nextVideoButtonOptions: NextVideoButtonOptions | 10 | private readonly nextVideoButtonOptions: NextVideoButtonOptions |
11 | 11 | ||
12 | constructor (player: VideoJsPlayer, options?: NextVideoButtonOptions) { | 12 | constructor (player: videojs.Player, options?: NextVideoButtonOptions) { |
13 | super(player, options) | 13 | super(player, options) |
14 | 14 | ||
15 | this.nextVideoButtonOptions = options | 15 | this.nextVideoButtonOptions = options |
diff --git a/client/src/assets/player/videojs-components/p2p-info-button.ts b/client/src/assets/player/videojs-components/p2p-info-button.ts index db6806fed..e340337ed 100644 --- a/client/src/assets/player/videojs-components/p2p-info-button.ts +++ b/client/src/assets/player/videojs-components/p2p-info-button.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { PlayerNetworkInfo } from '../peertube-videojs-typings' | 1 | import { PlayerNetworkInfo } from '../peertube-videojs-typings' |
2 | import videojs from 'video.js' | 2 | import videojs from 'video.js/dist/alt/video.core.js' |
3 | import { bytes } from '../utils' | 3 | import { bytes } from '../utils' |
4 | 4 | ||
5 | const Button = videojs.getComponent('Button') | 5 | const Button = videojs.getComponent('Button') |
diff --git a/client/src/assets/player/videojs-components/peertube-link-button.ts b/client/src/assets/player/videojs-components/peertube-link-button.ts index 0db9762a5..4151758d4 100644 --- a/client/src/assets/player/videojs-components/peertube-link-button.ts +++ b/client/src/assets/player/videojs-components/peertube-link-button.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { buildVideoLink } from '../utils' | 1 | import { buildVideoLink } from '../utils' |
2 | import videojs, { VideoJsPlayer } from 'video.js' | 2 | import videojs from 'video.js/dist/alt/video.core.js' |
3 | 3 | ||
4 | const Button = videojs.getComponent('Button') | 4 | const Button = videojs.getComponent('Button') |
5 | class PeerTubeLinkButton extends Button { | 5 | class PeerTubeLinkButton extends Button { |
6 | 6 | ||
7 | constructor (player: VideoJsPlayer, options?: videojs.ComponentOptions) { | 7 | constructor (player: videojs.Player, options?: videojs.ComponentOptions) { |
8 | super(player, options) | 8 | super(player, options) |
9 | } | 9 | } |
10 | 10 | ||
diff --git a/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts b/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts index 8168e8f2d..395720c53 100644 --- a/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts +++ b/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import videojs, { VideoJsPlayer } from 'video.js' | 1 | import videojs from 'video.js/dist/alt/video.core.js' |
2 | 2 | ||
3 | const Component = videojs.getComponent('Component') | 3 | const Component = videojs.getComponent('Component') |
4 | 4 | ||
5 | class PeerTubeLoadProgressBar extends Component { | 5 | class PeerTubeLoadProgressBar extends Component { |
6 | 6 | ||
7 | constructor (player: VideoJsPlayer, options?: videojs.ComponentOptions) { | 7 | constructor (player: videojs.Player, options?: videojs.ComponentOptions) { |
8 | super(player, options) | 8 | super(player, options) |
9 | 9 | ||
10 | this.on(player, 'progress', this.update) | 10 | this.on(player, 'progress', this.update) |
diff --git a/client/src/assets/player/videojs-components/resolution-menu-button.ts b/client/src/assets/player/videojs-components/resolution-menu-button.ts index 0fa6272e7..d49ca0230 100644 --- a/client/src/assets/player/videojs-components/resolution-menu-button.ts +++ b/client/src/assets/player/videojs-components/resolution-menu-button.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs, { VideoJsPlayer } from 'video.js' | 1 | import videojs from 'video.js/dist/alt/video.core.js' |
2 | 2 | ||
3 | import { LoadedQualityData } from '../peertube-videojs-typings' | 3 | import { LoadedQualityData } from '../peertube-videojs-typings' |
4 | import { ResolutionMenuItem } from './resolution-menu-item' | 4 | import { ResolutionMenuItem } from './resolution-menu-item' |
@@ -8,7 +8,7 @@ const MenuButton = videojs.getComponent('MenuButton') | |||
8 | class ResolutionMenuButton extends MenuButton { | 8 | class ResolutionMenuButton extends MenuButton { |
9 | labelEl_: HTMLElement | 9 | labelEl_: HTMLElement |
10 | 10 | ||
11 | constructor (player: VideoJsPlayer, options?: videojs.MenuButtonOptions) { | 11 | constructor (player: videojs.Player, options?: videojs.MenuButtonOptions) { |
12 | super(player, options) | 12 | super(player, options) |
13 | 13 | ||
14 | this.controlText('Quality') | 14 | this.controlText('Quality') |
diff --git a/client/src/assets/player/videojs-components/resolution-menu-item.ts b/client/src/assets/player/videojs-components/resolution-menu-item.ts index b039c4572..cb0d219ad 100644 --- a/client/src/assets/player/videojs-components/resolution-menu-item.ts +++ b/client/src/assets/player/videojs-components/resolution-menu-item.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs, { VideoJsPlayer } from 'video.js' | 1 | import videojs from 'video.js/dist/alt/video.core.js' |
2 | import { AutoResolutionUpdateData, ResolutionUpdateData } from '../peertube-videojs-typings' | 2 | import { AutoResolutionUpdateData, ResolutionUpdateData } from '../peertube-videojs-typings' |
3 | 3 | ||
4 | const MenuItem = videojs.getComponent('MenuItem') | 4 | const MenuItem = videojs.getComponent('MenuItem') |
@@ -19,7 +19,7 @@ class ResolutionMenuItem extends MenuItem { | |||
19 | private autoResolutionPossible: boolean | 19 | private autoResolutionPossible: boolean |
20 | private currentResolutionLabel: string | 20 | private currentResolutionLabel: string |
21 | 21 | ||
22 | constructor (player: VideoJsPlayer, options?: ResolutionMenuItemOptions) { | 22 | constructor (player: videojs.Player, options?: ResolutionMenuItemOptions) { |
23 | options.selectable = true | 23 | options.selectable = true |
24 | 24 | ||
25 | super(player, options) | 25 | super(player, options) |
diff --git a/client/src/assets/player/videojs-components/settings-dialog.ts b/client/src/assets/player/videojs-components/settings-dialog.ts index dd0b1e472..8fd5ad96c 100644 --- a/client/src/assets/player/videojs-components/settings-dialog.ts +++ b/client/src/assets/player/videojs-components/settings-dialog.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import videojs, { VideoJsPlayer } from 'video.js' | 1 | import videojs from 'video.js/dist/alt/video.core.js' |
2 | 2 | ||
3 | const Component = videojs.getComponent('Component') | 3 | const Component = videojs.getComponent('Component') |
4 | 4 | ||
5 | class SettingsDialog extends Component { | 5 | class SettingsDialog extends Component { |
6 | constructor (player: VideoJsPlayer) { | 6 | constructor (player: videojs.Player) { |
7 | super(player) | 7 | super(player) |
8 | 8 | ||
9 | this.hide() | 9 | this.hide() |
diff --git a/client/src/assets/player/videojs-components/settings-menu-button.ts b/client/src/assets/player/videojs-components/settings-menu-button.ts index eae628e7d..749128bdc 100644 --- a/client/src/assets/player/videojs-components/settings-menu-button.ts +++ b/client/src/assets/player/videojs-components/settings-menu-button.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | // Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu | 1 | // Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu |
2 | import { SettingsMenuItem } from './settings-menu-item' | 2 | import { SettingsMenuItem } from './settings-menu-item' |
3 | import { toTitleCase } from '../utils' | 3 | import { toTitleCase } from '../utils' |
4 | import videojs, { VideoJsPlayer } from 'video.js' | 4 | import videojs from 'video.js/dist/alt/video.core.js' |
5 | 5 | ||
6 | import { SettingsDialog } from './settings-dialog' | 6 | import { SettingsDialog } from './settings-dialog' |
7 | import { SettingsPanel } from './settings-panel' | 7 | import { SettingsPanel } from './settings-panel' |
@@ -32,7 +32,7 @@ class SettingsButton extends Button { | |||
32 | 32 | ||
33 | private settingsButtonOptions: SettingsButtonOptions | 33 | private settingsButtonOptions: SettingsButtonOptions |
34 | 34 | ||
35 | constructor (player: VideoJsPlayer, options?: SettingsButtonOptions) { | 35 | constructor (player: videojs.Player, options?: SettingsButtonOptions) { |
36 | super(player, options) | 36 | super(player, options) |
37 | 37 | ||
38 | this.settingsButtonOptions = options | 38 | this.settingsButtonOptions = options |
diff --git a/client/src/assets/player/videojs-components/settings-menu-item.ts b/client/src/assets/player/videojs-components/settings-menu-item.ts index f5671f49d..8d364591b 100644 --- a/client/src/assets/player/videojs-components/settings-menu-item.ts +++ b/client/src/assets/player/videojs-components/settings-menu-item.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | // Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu | 1 | // Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu |
2 | import { toTitleCase } from '../utils' | 2 | import { toTitleCase } from '../utils' |
3 | import videojs, { VideoJsPlayer } from 'video.js' | 3 | import videojs from 'video.js/dist/alt/video.core.js' |
4 | import { SettingsButton } from './settings-menu-button' | 4 | import { SettingsButton } from './settings-menu-button' |
5 | import { SettingsDialog } from './settings-dialog' | 5 | import { SettingsDialog } from './settings-dialog' |
6 | import { SettingsPanel } from './settings-panel' | 6 | import { SettingsPanel } from './settings-panel' |
@@ -32,7 +32,7 @@ class SettingsMenuItem extends MenuItem { | |||
32 | settingsSubMenuValueEl_: HTMLElement | 32 | settingsSubMenuValueEl_: HTMLElement |
33 | settingsSubMenuEl_: HTMLElement | 33 | settingsSubMenuEl_: HTMLElement |
34 | 34 | ||
35 | constructor (player: VideoJsPlayer, options?: SettingsMenuItemOptions) { | 35 | constructor (player: videojs.Player, options?: SettingsMenuItemOptions) { |
36 | super(player, options) | 36 | super(player, options) |
37 | 37 | ||
38 | this.settingsButton = options.menuButton | 38 | this.settingsButton = options.menuButton |
diff --git a/client/src/assets/player/videojs-components/settings-panel-child.ts b/client/src/assets/player/videojs-components/settings-panel-child.ts index d12e8218a..6dee6d7df 100644 --- a/client/src/assets/player/videojs-components/settings-panel-child.ts +++ b/client/src/assets/player/videojs-components/settings-panel-child.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import videojs, { VideoJsPlayer } from 'video.js' | 1 | import videojs from 'video.js/dist/alt/video.core.js' |
2 | 2 | ||
3 | const Component = videojs.getComponent('Component') | 3 | const Component = videojs.getComponent('Component') |
4 | 4 | ||
5 | class SettingsPanelChild extends Component { | 5 | class SettingsPanelChild extends Component { |
6 | 6 | ||
7 | constructor (player: VideoJsPlayer, options?: videojs.ComponentOptions) { | 7 | constructor (player: videojs.Player, options?: videojs.ComponentOptions) { |
8 | super(player, options) | 8 | super(player, options) |
9 | } | 9 | } |
10 | 10 | ||
diff --git a/client/src/assets/player/videojs-components/settings-panel.ts b/client/src/assets/player/videojs-components/settings-panel.ts index 2090abf45..833ee2f21 100644 --- a/client/src/assets/player/videojs-components/settings-panel.ts +++ b/client/src/assets/player/videojs-components/settings-panel.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import videojs, { VideoJsPlayer } from 'video.js' | 1 | import videojs from 'video.js/dist/alt/video.core.js' |
2 | 2 | ||
3 | const Component = videojs.getComponent('Component') | 3 | const Component = videojs.getComponent('Component') |
4 | 4 | ||
5 | class SettingsPanel extends Component { | 5 | class SettingsPanel extends Component { |
6 | 6 | ||
7 | constructor (player: VideoJsPlayer, options?: videojs.ComponentOptions) { | 7 | constructor (player: videojs.Player, options?: videojs.ComponentOptions) { |
8 | super(player, options) | 8 | super(player, options) |
9 | } | 9 | } |
10 | 10 | ||
diff --git a/client/src/assets/player/videojs-components/theater-button.ts b/client/src/assets/player/videojs-components/theater-button.ts index 1c8c9f154..41875af71 100644 --- a/client/src/assets/player/videojs-components/theater-button.ts +++ b/client/src/assets/player/videojs-components/theater-button.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs, { VideoJsPlayer } from 'video.js' | 1 | import videojs from 'video.js/dist/alt/video.core.js' |
2 | import { saveTheaterInStore, getStoredTheater } from '../peertube-player-local-storage' | 2 | import { saveTheaterInStore, getStoredTheater } from '../peertube-player-local-storage' |
3 | 3 | ||
4 | const Button = videojs.getComponent('Button') | 4 | const Button = videojs.getComponent('Button') |
@@ -6,7 +6,7 @@ class TheaterButton extends Button { | |||
6 | 6 | ||
7 | private static readonly THEATER_MODE_CLASS = 'vjs-theater-enabled' | 7 | private static readonly THEATER_MODE_CLASS = 'vjs-theater-enabled' |
8 | 8 | ||
9 | constructor (player: VideoJsPlayer, options: videojs.ComponentOptions) { | 9 | constructor (player: videojs.Player, options: videojs.ComponentOptions) { |
10 | super(player, options) | 10 | super(player, options) |
11 | 11 | ||
12 | const enabled = getStoredTheater() | 12 | const enabled = getStoredTheater() |