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
pull/5502/head
kontrollanten 2022-12-29 09:35:41 +02:00 committed by GitHub
parent 4afc70239d
commit 1f3198444f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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