diff --git a/src/js/media/html5.js b/src/js/media/html5.js index 4d5298b35d..1552e6b149 100644 --- a/src/js/media/html5.js +++ b/src/js/media/html5.js @@ -59,10 +59,6 @@ vjs.Html5 = vjs.MediaTechController.extend({ } } - if (this['featuresNativeTextTracks']) { - this.on('loadstart', vjs.bind(this, this.hideCaptions)); - } - // Determine if native controls should be used // Our goal should be to get the custom controls on mobile solid everywhere // so we can remove this all together. Right now this will block custom @@ -165,25 +161,6 @@ vjs.Html5.prototype.createEl = function(){ // jenniisawesome = true; }; - -vjs.Html5.prototype.hideCaptions = function() { - var tracks = this.el_.querySelectorAll('track'), - track, - i = tracks.length, - kinds = { - 'captions': 1, - 'subtitles': 1 - }; - - while (i--) { - track = tracks[i].track; - if ((track && track['kind'] in kinds) && - (!tracks[i]['default'])) { - track.mode = 'disabled'; - } - } -}; - // Make video events trigger player events // May seem verbose here, but makes other APIs possible. // Triggers removed using this.off when disposed @@ -426,25 +403,6 @@ vjs.Html5.prototype.addRemoteTextTrack = function(options) { } this.el().appendChild(track); - - if (track.track['kind'] === 'metadata') { - track['track']['mode'] = 'hidden'; - } else { - track['track']['mode'] = 'disabled'; - } - - track['onload'] = function() { - var tt = track['track']; - if (track.readyState >= 2) { - if (tt['kind'] === 'metadata' && tt['mode'] !== 'hidden') { - tt['mode'] = 'hidden'; - } else if (tt['kind'] !== 'metadata' && tt['mode'] !== 'disabled') { - tt['mode'] = 'disabled'; - } - track['onload'] = null; - } - }; - this.remoteTextTracks().addTrack_(track.track); return track;