aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/p2p-media-loader
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
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')
-rw-r--r--client/src/assets/player/p2p-media-loader/hls-plugin.ts6
-rw-r--r--client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts4
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
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
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 @@
1import videojs, { VideoJsPlayer } from 'video.js' 1import videojs from 'video.js/dist/alt/video.core.js'
2import { P2PMediaLoaderPluginOptions, PlayerNetworkInfo } from '../peertube-videojs-typings' 2import { P2PMediaLoaderPluginOptions, PlayerNetworkInfo } from '../peertube-videojs-typings'
3import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from 'p2p-media-loader-hlsjs' 3import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from 'p2p-media-loader-hlsjs'
4import { Events, Segment } from 'p2p-media-loader-core' 4import { 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