aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/p2p-media-loader/hls-plugin.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-17 11:20:12 +0200
committerChocobozzz <me@florianbigard.com>2020-04-17 14:12:43 +0200
commit7e37e111116e41530749b88327bc601cb39ade03 (patch)
treea141a84b6999029084629d45a3d5addbfa34e603 /client/src/assets/player/p2p-media-loader/hls-plugin.ts
parentbb3933ef370c46be6090e4e522c6e3f5b7144f4c (diff)
downloadPeerTube-7e37e111116e41530749b88327bc601cb39ade03.tar.gz
PeerTube-7e37e111116e41530749b88327bc601cb39ade03.tar.zst
PeerTube-7e37e111116e41530749b88327bc601cb39ade03.zip
Fix videojs typings
Diffstat (limited to 'client/src/assets/player/p2p-media-loader/hls-plugin.ts')
-rw-r--r--client/src/assets/player/p2p-media-loader/hls-plugin.ts6
1 files changed, 3 insertions, 3 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
4import * as Hlsjs from 'hls.js/dist/hls.light.js' 4import * as Hlsjs from 'hls.js/dist/hls.light.js'
5import videojs, { VideoJsPlayer } from 'video.js' 5import videojs from 'video.js/dist/alt/video.core.js'
6import { HlsjsConfigHandlerOptions, QualityLevelRepresentation, QualityLevels, VideoJSTechHLS } from '../peertube-videojs-typings' 6import { HlsjsConfigHandlerOptions, QualityLevelRepresentation, QualityLevels, VideoJSTechHLS } from '../peertube-videojs-typings'
7 7
8type ErrorCounts = { 8type 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
58function hlsjsConfigHandler (this: VideoJsPlayer, options: HlsjsConfigHandlerOptions) { 58function 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