From 02b2e482e0bdf16432b1ee34e95a71bbad39a4ff Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 22 Oct 2021 16:18:00 +0200 Subject: Fix some old typing issues --- client/src/assets/player/p2p-media-loader/hls-plugin.ts | 4 ---- client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'client/src/assets/player/p2p-media-loader') 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 17b9aba97..71c31696a 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts @@ -68,10 +68,6 @@ function hlsjsConfigHandler (this: videojs.Player, options: HlsjsConfigHandlerOp player.srOptions_.hlsjsConfig = options.hlsjsConfig } - if (!player.srOptions_.captionConfig) { - player.srOptions_.captionConfig = options.captionConfig - } - if (options.levelLabelHandler && !player.srOptions_.levelLabelHandler) { player.srOptions_.levelLabelHandler = options.levelLabelHandler } 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 d917fda03..f8e5e2d6b 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 @@ -89,8 +89,7 @@ class P2pMediaLoaderPlugin extends Plugin { } getLiveLatency () { - // FIXME: typings - return Math.round((this.hlsjs as any).latency) + return Math.round(this.hlsjs.latency) } getHLSJS () { @@ -113,7 +112,7 @@ class P2pMediaLoaderPlugin extends Plugin { initHlsJsPlayer(this.hlsjs) // FIXME: typings - const options = this.player.tech(true).options_ as any + const options = (this.player.tech(true).options_ as any) this.p2pEngine = options.hlsjsConfig.loader.getEngine() this.p2pEngine.on(Events.SegmentError, (segment: Segment, err) => { -- cgit v1.2.3