diff options
Diffstat (limited to 'client/src/assets/player')
5 files changed, 4 insertions, 10 deletions
diff --git a/client/src/assets/player/p2p-media-loader/hls-plugin.ts b/client/src/assets/player/p2p-media-loader/hls-plugin.ts index 9e2ac1aa4..51acad670 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts | |||
@@ -13,7 +13,7 @@ type Metadata = { | |||
13 | levels: Hlsjs.Level[] | 13 | levels: Hlsjs.Level[] |
14 | } | 14 | } |
15 | 15 | ||
16 | type CustomAudioTrack = AudioTrack & { name?: string, lang?: string } | 16 | type CustomAudioTrack = Hlsjs.AudioTrack & { name?: string, lang?: string } |
17 | 17 | ||
18 | const registerSourceHandler = function (vjs: typeof videojs) { | 18 | const registerSourceHandler = function (vjs: typeof videojs) { |
19 | if (!Hlsjs.isSupported()) { | 19 | if (!Hlsjs.isSupported()) { |
@@ -180,8 +180,6 @@ class Html5Hlsjs { | |||
180 | this.player.textTracks().removeEventListener('change', this.handlers.textTracksChange) | 180 | this.player.textTracks().removeEventListener('change', this.handlers.textTracksChange) |
181 | this.uiTextTrackHandled = false | 181 | this.uiTextTrackHandled = false |
182 | 182 | ||
183 | this.player.audioTracks().removeEventListener('change', this.handlers.audioTracksChange) | ||
184 | |||
185 | this.hls.destroy() | 183 | this.hls.destroy() |
186 | } | 184 | } |
187 | 185 | ||
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index f12fb09ae..e9597dde1 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts | |||
@@ -19,9 +19,7 @@ import './videojs-components/settings-panel' | |||
19 | import './videojs-components/settings-panel-child' | 19 | import './videojs-components/settings-panel-child' |
20 | import './videojs-components/theater-button' | 20 | import './videojs-components/theater-button' |
21 | import videojs from 'video.js' | 21 | import videojs from 'video.js' |
22 | 22 | import { isDefaultLocale, VideoFile } from '@shared/models' | |
23 | import { isDefaultLocale } from '../../../../shared/models/i18n/i18n' | ||
24 | import { VideoFile } from '../../../../shared/models/videos' | ||
25 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' | 23 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' |
26 | import { segmentUrlBuilderFactory } from './p2p-media-loader/segment-url-builder' | 24 | import { segmentUrlBuilderFactory } from './p2p-media-loader/segment-url-builder' |
27 | import { segmentValidatorFactory } from './p2p-media-loader/segment-validator' | 25 | import { segmentValidatorFactory } from './p2p-media-loader/segment-validator' |
diff --git a/client/src/assets/player/peertube-videojs-typings.ts b/client/src/assets/player/peertube-videojs-typings.ts index cb7d6f6b4..9c81fd5bc 100644 --- a/client/src/assets/player/peertube-videojs-typings.ts +++ b/client/src/assets/player/peertube-videojs-typings.ts | |||
@@ -41,8 +41,6 @@ declare module 'video.js' { | |||
41 | tracks_: (TextTrack & { id: string, label: string, src: string })[] | 41 | tracks_: (TextTrack & { id: string, label: string, src: string })[] |
42 | } | 42 | } |
43 | 43 | ||
44 | audioTracks (): AudioTrackList | ||
45 | |||
46 | dock (options: { title: string, description: string }): void | 44 | dock (options: { title: string, description: string }): void |
47 | } | 45 | } |
48 | } | 46 | } |
diff --git a/client/src/assets/player/translations-manager.ts b/client/src/assets/player/translations-manager.ts index e9f300ce7..2bde7d6ca 100644 --- a/client/src/assets/player/translations-manager.ts +++ b/client/src/assets/player/translations-manager.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '../../../../shared/models' | 1 | import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '@shared/models' |
2 | 2 | ||
3 | export class TranslationsManager { | 3 | export class TranslationsManager { |
4 | private static videojsLocaleCache: { [ path: string ]: any } = {} | 4 | private static videojsLocaleCache: { [ path: string ]: any } = {} |
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index 3135f4e6c..20d97c7e2 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { VideoFile } from '../../../../shared/models/videos' | 1 | import { VideoFile } from '@shared/models' |
2 | 2 | ||
3 | function toTitleCase (str: string) { | 3 | function toTitleCase (str: string) { |
4 | return str.charAt(0).toUpperCase() + str.slice(1) | 4 | return str.charAt(0).toUpperCase() + str.slice(1) |