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

null out currentSource_ on tech dispose and src change #3314

Closed
wants to merge 3 commits into from

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented May 11, 2016

Follow up to #3285, we need currentSource_ to be cleared out if we're switching sources on a tech and we're no longer using a source handler. Plus, when the tech is disposed, we should clear out the currentSource_.

@@ -813,6 +813,8 @@ Tech.withSourceHandlers = function(_Tech){
// than clear all of our current tracks
if (this.currentSource_) {
this.clearTracks(['audio', 'video']);
Copy link
Member Author

Choose a reason for hiding this comment

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

@brandonocasey is there a reason why we don't want to just always call clearTracks() here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I entirely remember but I think it had to do with saving keeping Audio/Video Tracks that were added before we had a currentSource

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I'll see what I can find out. Currently, the tests break because of this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ended up removing clearing out the currentSource_ in disposeSourceHandler and only doing it inside this if statement.

@incompl
Copy link

incompl commented May 11, 2016

Looks good to me

@gkatsev gkatsev added patch This PR can be added to a patch release. needs: LGTM Needs one or more additional approvals labels May 11, 2016
@misteroneill
Copy link
Member

LGTM

@gkatsev gkatsev closed this in 82d396a May 12, 2016
@gkatsev gkatsev deleted the null-out-currentSource_ branch May 12, 2016 18:58
@gkatsev gkatsev removed the needs: LGTM Needs one or more additional approvals label Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch This PR can be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants