From 7e37e111116e41530749b88327bc601cb39ade03 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Apr 2020 11:20:12 +0200 Subject: Fix videojs typings --- client/src/assets/player/p2p-media-loader/hls-plugin.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/src/assets/player/p2p-media-loader/hls-plugin.ts') 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 @@ // We duplicated this plugin to choose the hls.js version we want, because streamroot only provide a bundled file import * as Hlsjs from 'hls.js/dist/hls.light.js' -import videojs, { VideoJsPlayer } from 'video.js' +import videojs from 'video.js/dist/alt/video.core.js' import { HlsjsConfigHandlerOptions, QualityLevelRepresentation, QualityLevels, VideoJSTechHLS } from '../peertube-videojs-typings' type ErrorCounts = { @@ -55,7 +55,7 @@ const registerSourceHandler = function (vjs: typeof videojs) { (vjs as any).Html5Hlsjs = Html5Hlsjs } -function hlsjsConfigHandler (this: VideoJsPlayer, options: HlsjsConfigHandlerOptions) { +function hlsjsConfigHandler (this: videojs.Player, options: HlsjsConfigHandlerOptions) { const player = this if (!options) return @@ -88,7 +88,7 @@ class Html5Hlsjs { private readonly videoElement: HTMLVideoElement private readonly errorCounts: ErrorCounts = {} - private readonly player: VideoJsPlayer + private readonly player: videojs.Player private readonly tech: videojs.Tech private readonly source: videojs.Tech.SourceObject private readonly vjs: typeof videojs -- cgit v1.2.3