From fd69c52f8477c44ce506f5a44bc5ee394cad0ef0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 8 Apr 2020 09:12:52 +0200 Subject: [PATCH] Use hls.js light Because we don't need subtitling and alternate-audio features --- client/src/assets/player/p2p-media-loader/hls-plugin.ts | 2 +- .../assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | 2 +- 2 files changed, 2 insertions(+), 2 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 5bfa39cfa..876ed7d9c 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts @@ -1,7 +1,7 @@ // Thanks https://github.com/streamroot/videojs-hlsjs-plugin // 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' +import * as Hlsjs from 'hls.js/dist/hls.light.js' import videojs, { VideoJsPlayer } from 'video.js' import { HlsjsConfigHandlerOptions, QualityLevelRepresentation, QualityLevels, VideoJSTechHLS } from '../peertube-videojs-typings' 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 e86900faa..ca205d899 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 @@ -4,7 +4,7 @@ import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from 'p2p-medi import { Events, Segment } from 'p2p-media-loader-core' import { timeToInt } from '../utils' import { registerConfigPlugin, registerSourceHandler } from './hls-plugin' -import * as Hlsjs from 'hls.js' +import * as Hlsjs from 'hls.js/dist/hls.light.js' registerConfigPlugin(videojs) registerSourceHandler(videojs)