Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Trigger player error on initial request error instead of media source error #1061

Merged
merged 1 commit into from
Apr 10, 2017

Conversation

gesinger
Copy link
Contributor

Description

See #575
This is to resolve an issue where we try to trigger an error on a media source that isn't yet ready.

Specific Changes proposed

Since we still want to trigger an error on the player, and can't use the media source (since it isn't ready yet), this fires the error directly on the player.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
  • Reviewed by Two Core Contributors

@@ -817,7 +817,7 @@ export class MasterPlaylistController extends videojs.EventTarget {
// trying to load the master OR while we were disposing of the tech
if (!currentPlaylist) {
this.error = error;
return this.mediaSource.endOfStream('network');
return this.trigger('error');
Copy link
Contributor

Choose a reason for hiding this comment

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

What about putting the endOfStream call in a try catch and if it fails trigger the error on MPC? I feel like we probably want to still call endOfStream in the common case of not hitting an InvalidStateError

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants