Skip to content

Add fallback strategy for source selection - #890

Merged
Dananji merged 3 commits into
mainfrom
fallback-source
Dec 9, 2025
Merged

Add fallback strategy for source selection#890
Dananji merged 3 commits into
mainfrom
fallback-source

Conversation

@Dananji

@Dananji Dananji commented Dec 5, 2025

Copy link
Copy Markdown
Collaborator

Related issue: #872

Changes in this PR:

Implemented source fallback functionality for VideoJS,

  • for source selection with the @silvermine/videojs-quality-selector plugin. With this fix, when a source choice in quality selector fails to load, the player automatically cycles through available sources until one works. While trying available source choices it marks unavailable sources choices in the quality selector menu. If all sources fail an error message is displayed using VideoJS' error modal.
  • for a multi-sourced Canvas where multiple segments are stitched together to build a single Canvas. With this fix; when a source fails to load while user is scrubbing/using structured navigation actions, the next viable available segment is loaded into the player. And the failed segment is marked as blocked in the progress-bar for the player session.

When the player encounters a failing source that particular source gets disabled in the quality selector for the player session (until page is reloaded, or switched to another Canvas) and an error is logged to the devTools console.

Screenshot 2025-12-05 at 3 37 14 PM

When all sources fail an error is displayed using VideoJS's error modal.

Screenshot 2025-12-05 at 3 36 31 PM

When 2 consecutive source segments are failing in a multi-sourced Canvas the error message is displayed as a non-dismissable toast notification before loading the next viable available segment.

Screen.Recording.2025-12-09.at.10.01.10.AM.mov

@Dananji
Dananji marked this pull request as draft December 6, 2025 00:21
@Dananji
Dananji force-pushed the fallback-source branch 2 times, most recently from 46be894 to 48834d4 Compare December 9, 2025 18:00
@Dananji Dananji changed the title Add fallback strategy for source selection in quality selector Add fallback strategy for source selection Dec 9, 2025
@Dananji
Dananji marked this pull request as ready for review December 9, 2025 19:25

@cjcolvar cjcolvar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code looks good to me. I think it will be good to get this into Avalon to test it out thoroughly.

Comment thread src/components/MediaPlayer/VideoJS/VideoJSPlayer.js
@Dananji
Dananji merged commit 43c15be into main Dec 9, 2025
2 checks passed
@Dananji
Dananji deleted the fallback-source branch December 9, 2025 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants