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:
@@ -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))
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user