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/standalone/videos/embed.ts | |
parent | bb3933ef370c46be6090e4e522c6e3f5b7144f4c (diff) | |
download | PeerTube-7e37e111116e41530749b88327bc601cb39ade03.tar.gz PeerTube-7e37e111116e41530749b88327bc601cb39ade03.tar.zst PeerTube-7e37e111116e41530749b88327bc601cb39ade03.zip |
Fix videojs typings
Diffstat (limited to 'client/src/standalone/videos/embed.ts')
-rw-r--r-- | client/src/standalone/videos/embed.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 879850daf..6616fab48 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -15,14 +15,14 @@ import { | |||
15 | import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' | 15 | import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' |
16 | import { PeerTubeEmbedApi } from './embed-api' | 16 | import { PeerTubeEmbedApi } from './embed-api' |
17 | import { TranslationsManager } from '../../assets/player/translations-manager' | 17 | import { TranslationsManager } from '../../assets/player/translations-manager' |
18 | import { VideoJsPlayer } from 'video.js' | 18 | import videojs from 'video.js/dist/alt/video.core.js' |
19 | import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings' | 19 | import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings' |
20 | 20 | ||
21 | type Translations = { [ id: string ]: string } | 21 | type Translations = { [ id: string ]: string } |
22 | 22 | ||
23 | export class PeerTubeEmbed { | 23 | export class PeerTubeEmbed { |
24 | videoElement: HTMLVideoElement | 24 | videoElement: HTMLVideoElement |
25 | player: VideoJsPlayer | 25 | player: videojs.Player |
26 | api: PeerTubeEmbedApi = null | 26 | api: PeerTubeEmbedApi = null |
27 | autoplay: boolean | 27 | autoplay: boolean |
28 | controls: boolean | 28 | controls: boolean |
@@ -237,7 +237,7 @@ export class PeerTubeEmbed { | |||
237 | }) | 237 | }) |
238 | } | 238 | } |
239 | 239 | ||
240 | this.player = await PeertubePlayerManager.initialize(this.mode, options, (player: VideoJsPlayer) => this.player = player) | 240 | this.player = await PeertubePlayerManager.initialize(this.mode, options, (player: videojs.Player) => this.player = player) |
241 | this.player.on('customError', (event: any, data: any) => this.handleError(data.err, serverTranslations)) | 241 | this.player.on('customError', (event: any, data: any) => this.handleError(data.err, serverTranslations)) |
242 | 242 | ||
243 | window[ 'videojsPlayer' ] = this.player | 243 | window[ 'videojsPlayer' ] = this.player |