Skip to content

Commit

Permalink
Frontend fix media_err_decode on playback (#4506)
Browse files Browse the repository at this point in the history
  • Loading branch information
NodudeWasTaken committed Feb 5, 2024
1 parent 11cafe9 commit 0b82dbf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/v2.5/src/components/ScenePlayer/source-selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down

0 comments on commit 0b82dbf

Please sign in to comment.