mirror of
https://github.com/videojs/video.js.git
synced 2025-02-06 11:51:07 +02:00
@gkatsev fixed disabling of default text tracks. closes #1892
This commit is contained in:
parent
0b392fa9f5
commit
2a1f9f357f
@ -2,7 +2,7 @@ CHANGELOG
|
||||
=========
|
||||
|
||||
## HEAD (Unreleased)
|
||||
_(none)_
|
||||
* @gkatsev fixed disabling of default text tracks ([view](https://github.com/videojs/video.js/pull/1892))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -167,7 +167,7 @@ vjs.Html5.prototype.createEl = function(){
|
||||
|
||||
|
||||
vjs.Html5.prototype.hideCaptions = function() {
|
||||
var tracks = this.el_.textTracks,
|
||||
var tracks = this.el_.querySelectorAll('track'),
|
||||
track,
|
||||
i = tracks.length,
|
||||
kinds = {
|
||||
@ -176,8 +176,9 @@ vjs.Html5.prototype.hideCaptions = function() {
|
||||
};
|
||||
|
||||
while (i--) {
|
||||
track = tracks[i];
|
||||
if (track && track['kind'] in kinds) {
|
||||
track = tracks[i].track;
|
||||
if ((track && track['kind'] in kinds) &&
|
||||
(!tracks[i]['default'])) {
|
||||
track.mode = 'disabled';
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user