Frontend fix media_err_decode on playback (#4506)

This commit is contained in:
NodudeWasTaken 2024-02-06 00:08:40 +01:00 committed by GitHub
parent 11cafe933a
commit 0b82dbf666
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -145,7 +145,11 @@ class SourceSelectorPlugin extends videojs.getPlugin("plugin") {
if (!error) return;
// Only try next source if media was unsupported
if (error.code !== MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED) return;
if (
error.code !== MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED &&
error.code !== MediaError.MEDIA_ERR_DECODE
)
return;
const currentSource = player.currentSource() as ISource;
console.log(`Source '${currentSource.label}' is unsupported`);