1
0
Fork 0

Fix HLS fallback

This commit is contained in:
Chocobozzz 2022-10-28 15:32:06 +02:00
parent 814e9e07ba
commit 0b8e50aa8d
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 10 additions and 1 deletions

View File

@ -54,7 +54,16 @@ class P2pMediaLoaderPlugin extends Plugin {
if (message) {
logger.warn(message)
player.ready(() => player.trigger('error', new Error(message)))
const error: MediaError = {
code: MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED,
message,
MEDIA_ERR_ABORTED: MediaError.MEDIA_ERR_ABORTED,
MEDIA_ERR_DECODE: MediaError.MEDIA_ERR_DECODE,
MEDIA_ERR_NETWORK: MediaError.MEDIA_ERR_NETWORK,
MEDIA_ERR_SRC_NOT_SUPPORTED: MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED
}
player.ready(() => player.error(error))
return
}
} else {