From f2c29ced30225f2926f7df2a66d3e69d08323994 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 8 Sep 2022 11:10:01 +0200 Subject: Fix broken player on non MSE devices --- .../assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client/src/assets/player/shared/p2p-media-loader') diff --git a/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts b/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts index 54d87aea5..56068e340 100644 --- a/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts +++ b/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts @@ -84,6 +84,8 @@ class P2pMediaLoaderPlugin extends Plugin { } getCurrentLevel () { + if (!this.hlsjs) return undefined + return this.hlsjs.levels[this.hlsjs.currentLevel] } -- cgit v1.2.3