Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only call source handler dispose once on the same source handler #3343

Closed
wants to merge 1 commit into from
Closed

only call source handler dispose once on the same source handler #3343

wants to merge 1 commit into from

Conversation

brandonocasey
Copy link
Contributor

Description

Currently we will try to dispose of SourceHandlers twice when we call setSource multiple times, this causes videojs to throw an error on the second setSource

Specific Changes proposed

  • Null out sourceHandler_ on the tech when sourceHandler is disposed

Requirements Checklist

  • Feature implemented / Bug fixed
  • Reviewed by Two Core Contributors

@@ -855,6 +855,7 @@ Tech.withSourceHandlers = function(_Tech){
this.off(this.el_, 'loadstart', _Tech.prototype.firstLoadStartListener_);
this.off(this.el_, 'loadstart', _Tech.prototype.successiveLoadStartListener_);
this.sourceHandler_.dispose();
this.sourceHandler_ = null;
Copy link
Member

Choose a reason for hiding this comment

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

Not much to argue about here.

LGTM!

@gkatsev
Copy link
Member

gkatsev commented May 27, 2016

LGTM.

@gkatsev gkatsev added confirmed patch This PR can be added to a patch release. labels May 27, 2016
@gkatsev gkatsev closed this in fa8fc80 May 27, 2016
@brandonocasey brandonocasey deleted the fix/source-handler-dispose branch June 1, 2016 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed patch This PR can be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants