From 1f3198444f9c839508876870cb3f7feecc1b3108 Mon Sep 17 00:00:00 2001 From: kontrollanten <6680299+kontrollanten@users.noreply.github.com> Date: Thu, 29 Dec 2022 09:35:41 +0200 Subject: Log HLS fatal error with error label (#5484) * fix(client/p2p-media-loader): logg err upon fatal * feat(client/p2p-media-loader): err log currentTime --- client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts b/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts index a14beb347..7f7d90ab9 100644 --- a/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/shared/p2p-media-loader/hls-plugin.ts @@ -281,8 +281,8 @@ class Html5Hlsjs { if (this.errorCounts[data.type]) this.errorCounts[data.type] += 1 else this.errorCounts[data.type] = 1 - if (data.fatal) logger.warn(error.message) - else logger.error(error.message, { data }) + if (data.fatal) logger.error(error.message, { currentTime: this.player.currentTime(), data }) + else logger.warn(error.message) if (data.type === Hlsjs.ErrorTypes.NETWORK_ERROR) { error.code = 2 -- cgit v1.2.3