1
0
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:
Gary Katsevman 2015-02-25 16:12:01 -08:00 committed by heff
parent 0b392fa9f5
commit 2a1f9f357f
2 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,7 @@ CHANGELOG
=========
## HEAD (Unreleased)
_(none)_
* @gkatsev fixed disabling of default text tracks ([view](https://github.com/videojs/video.js/pull/1892))
--------------------

View File

@ -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';
}
}