mirror of
https://github.com/videojs/video.js.git
synced 2025-02-02 11:34:50 +02:00
@gkatsev nulled out currentSource_ in setSource. closes #3314
This commit is contained in:
parent
971dbaecc4
commit
82d396a1fb
@ -2,7 +2,7 @@ CHANGELOG
|
||||
=========
|
||||
|
||||
## 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
|
||||
if (this.currentSource_) {
|
||||
this.clearTracks(['audio', 'video']);
|
||||
|
||||
this.currentSource_ = null;
|
||||
}
|
||||
|
||||
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
|
||||
equal(tech.audioTracks().length, 0, 'should have zero audio 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.remoteTextTracks().length, 2, 'should have two remote text tracks');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user