Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
Conflicts:
	dist/video-js/video-js.css
	dist/video-js/video-js.min.css
	dist/video-js/video.dev.js
	dist/video-js/video.js
	dist/video-js/video.novtt.dev.js
	dist/video-js/video.novtt.js
  • Loading branch information
heff committed Feb 20, 2015
2 parents 7bcb1d2 + 8e372d7 commit 550d443
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/js/media/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 0 additions & 4 deletions src/js/tracks/text-track-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@
}
}

if (target.selectedOptions) {
target.selectedOptions[0] = option;
}

target.selectedIndex = i;
}

Expand Down
20 changes: 20 additions & 0 deletions test/unit/tracks/tracks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});

0 comments on commit 550d443

Please sign in to comment.