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/p2p-media-loader | |
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/p2p-media-loader')
-rw-r--r-- | client/src/assets/player/p2p-media-loader/hls-plugin.ts | 6 | ||||
-rw-r--r-- | client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | 4 |
2 files changed, 5 insertions, 5 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 876ed7d9c..6937d147a 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | // We duplicated this plugin to choose the hls.js version we want, because streamroot only provide a bundled file | 2 | // We duplicated this plugin to choose the hls.js version we want, because streamroot only provide a bundled file |
3 | 3 | ||
4 | import * as Hlsjs from 'hls.js/dist/hls.light.js' | 4 | import * as Hlsjs from 'hls.js/dist/hls.light.js' |
5 | import videojs, { VideoJsPlayer } from 'video.js' | 5 | import videojs from 'video.js/dist/alt/video.core.js' |
6 | import { HlsjsConfigHandlerOptions, QualityLevelRepresentation, QualityLevels, VideoJSTechHLS } from '../peertube-videojs-typings' | 6 | import { HlsjsConfigHandlerOptions, QualityLevelRepresentation, QualityLevels, VideoJSTechHLS } from '../peertube-videojs-typings' |
7 | 7 | ||
8 | type ErrorCounts = { | 8 | type ErrorCounts = { |
@@ -55,7 +55,7 @@ const registerSourceHandler = function (vjs: typeof videojs) { | |||
55 | (vjs as any).Html5Hlsjs = Html5Hlsjs | 55 | (vjs as any).Html5Hlsjs = Html5Hlsjs |
56 | } | 56 | } |
57 | 57 | ||
58 | function hlsjsConfigHandler (this: VideoJsPlayer, options: HlsjsConfigHandlerOptions) { | 58 | function hlsjsConfigHandler (this: videojs.Player, options: HlsjsConfigHandlerOptions) { |
59 | const player = this | 59 | const player = this |
60 | 60 | ||
61 | if (!options) return | 61 | if (!options) return |
@@ -88,7 +88,7 @@ class Html5Hlsjs { | |||
88 | 88 | ||
89 | private readonly videoElement: HTMLVideoElement | 89 | private readonly videoElement: HTMLVideoElement |
90 | private readonly errorCounts: ErrorCounts = {} | 90 | private readonly errorCounts: ErrorCounts = {} |
91 | private readonly player: VideoJsPlayer | 91 | private readonly player: videojs.Player |
92 | private readonly tech: videojs.Tech | 92 | private readonly tech: videojs.Tech |
93 | private readonly source: videojs.Tech.SourceObject | 93 | private readonly source: videojs.Tech.SourceObject |
94 | private readonly vjs: typeof videojs | 94 | private readonly vjs: typeof videojs |
diff --git a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts index ca205d899..161c92b5e 100644 --- a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.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 { P2PMediaLoaderPluginOptions, PlayerNetworkInfo } from '../peertube-videojs-typings' | 2 | import { P2PMediaLoaderPluginOptions, PlayerNetworkInfo } from '../peertube-videojs-typings' |
3 | import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from 'p2p-media-loader-hlsjs' | 3 | import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from 'p2p-media-loader-hlsjs' |
4 | import { Events, Segment } from 'p2p-media-loader-core' | 4 | import { Events, Segment } from 'p2p-media-loader-core' |
@@ -36,7 +36,7 @@ class P2pMediaLoaderPlugin extends Plugin { | |||
36 | 36 | ||
37 | private networkInfoInterval: any | 37 | private networkInfoInterval: any |
38 | 38 | ||
39 | constructor (player: VideoJsPlayer, options?: P2PMediaLoaderPluginOptions) { | 39 | constructor (player: videojs.Player, options?: P2PMediaLoaderPluginOptions) { |
40 | super(player) | 40 | super(player) |
41 | 41 | ||
42 | this.options = options | 42 | this.options = options |