diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ba06a0e7..b482633f9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ _(none)_ -------------------- +## 4.12.1 (2015-02-19) +* @gkatsev fixed the track list reference while switching techs that use emulated tracks ([view](https://github.com/videojs/video.js/pull/1874)) +* @gkatsev fixed a Firefox error with the captions settings select menu options ([view](https://github.com/videojs/video.js/pull/1877)) + ## 4.12.0 (2015-02-17) * @PeterDaveHello added a Traditional Chinese translation ([view](https://github.com/videojs/video.js/pull/1729)) * @mmcc updated the hide/show functions to use a class instead of inline styles ([view](https://github.com/videojs/video.js/pull/1681)) diff --git a/bower.json b/bower.json index 4e439e4fad..fbc2c74941 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "video.js", "description": "An HTML5 and Flash video player with a common API and skin for both.", - "version": "4.12.0", + "version": "4.12.1", "main": [ "dist/video-js/video.js", "dist/video-js/video-js.css", diff --git a/component.json b/component.json index 464bd03587..2c59b2d2d9 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "name": "video.js", "description": "An HTML5 and Flash video player with a common API and skin for both.", - "version": "4.12.0", + "version": "4.12.1", "keywords": [ "videojs", "html5", diff --git a/package.json b/package.json index 6ee024e198..18930373fc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "video.js", "description": "An HTML5 and Flash video player with a common API and skin for both.", - "version": "4.12.0", + "version": "4.12.1", "copyright": "Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE", "keywords": [ "videojs", diff --git a/src/js/media/media.js b/src/js/media/media.js index 6c121f8e8b..34605bc508 100644 --- a/src/js/media/media.js +++ b/src/js/media/media.js @@ -345,13 +345,13 @@ vjs.MediaTechController.prototype.emulateTextTracks = function() { vjs.MediaTechController.prototype.textTracks_; vjs.MediaTechController.prototype.textTracks = function() { - this.textTracks_ = this.textTracks_ || new vjs.TextTrackList(); - return this.textTracks_; + this.player_.textTracks_ = this.player_.textTracks_ || new vjs.TextTrackList(); + return this.player_.textTracks_; }; vjs.MediaTechController.prototype.remoteTextTracks = function() { - this.remoteTextTracks_ = this.remoteTextTracks_ || new vjs.TextTrackList(); - return this.remoteTextTracks_; + this.player_.remoteTextTracks_ = this.player_.remoteTextTracks_ || new vjs.TextTrackList(); + return this.player_.remoteTextTracks_; }; createTrackHelper = function(self, kind, label, language, options) { diff --git a/src/js/tracks/text-track-settings.js b/src/js/tracks/text-track-settings.js index e0e949de19..32c5b99388 100644 --- a/src/js/tracks/text-track-settings.js +++ b/src/js/tracks/text-track-settings.js @@ -163,10 +163,6 @@ } } - if (target.selectedOptions) { - target.selectedOptions[0] = option; - } - target.selectedIndex = i; } diff --git a/test/unit/tracks/tracks.js b/test/unit/tracks/tracks.js index 58335ca970..59d1334a35 100644 --- a/test/unit/tracks/tracks.js +++ b/test/unit/tracks/tracks.js @@ -285,3 +285,23 @@ test('html5 tech supports native text tracks if the video supports it, unless it vjs.TEST_VID = oldTestVid; vjs.IS_FIREFOX = oldIsFirefox; }); + +test('when switching techs, we should not get a new text track', function() { + var player = PlayerTest.makePlayer({ + html5: { + nativeTextTracks: false + } + }), + htmltracks, + flashtracks; + + player.loadTech('Html5'); + + htmltracks = player.textTracks(); + + player.loadTech('Flash'); + + flashtracks = player.textTracks(); + + ok(htmltracks === flashtracks, 'the tracks are equal'); +});