1
0
mirror of https://github.com/videojs/video.js.git synced 2025-11-06 09:19:15 +02:00

@gkatsev nulled out currentSource_ in setSource. closes #3314

This commit is contained in:
Gary Katsevman
2016-05-12 14:43:10 -04:00
parent 971dbaecc4
commit 82d396a1fb
3 changed files with 4 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ CHANGELOG
========= =========
## HEAD (Unreleased) ## HEAD (Unreleased)
_(none)_ * @gkatsev nulled out currentSource_ in setSource ([view](https://github.com/videojs/video.js/pull/3314))
-------------------- --------------------

View File

@@ -813,6 +813,8 @@ Tech.withSourceHandlers = function(_Tech){
// than clear all of our current tracks // than clear all of our current tracks
if (this.currentSource_) { if (this.currentSource_) {
this.clearTracks(['audio', 'video']); this.clearTracks(['audio', 'video']);
this.currentSource_ = null;
} }
if (sh !== _Tech.nativeSourceHandler) { if (sh !== _Tech.nativeSourceHandler) {

View File

@@ -265,7 +265,7 @@ test('should add the source handler interface to a tech', function(){
// verify that all the tracks were removed as we got a new source // verify that all the tracks were removed as we got a new source
equal(tech.audioTracks().length, 0, 'should have zero audio tracks'); equal(tech.audioTracks().length, 0, 'should have zero audio tracks');
equal(tech.videoTracks().length, 0, 'should have zero video tracks'); equal(tech.videoTracks().length, 0, 'should have zero video tracks');
equal(tech.textTracks().length, 2, 'should have two video tracks'); equal(tech.textTracks().length, 2, 'should have two text tracks');
equal(tech.remoteTextTrackEls().length, 2, 'should have two remote text tracks els'); equal(tech.remoteTextTrackEls().length, 2, 'should have two remote text tracks els');
equal(tech.remoteTextTracks().length, 2, 'should have two remote text tracks'); equal(tech.remoteTextTracks().length, 2, 'should have two remote text tracks');