mirror of
https://github.com/videojs/video.js.git
synced 2025-01-10 23:30:03 +02:00
@gkatsev fixed text track tests for older IEs. closes #3269
This commit is contained in:
parent
048dad4cf3
commit
264e53fb5b
@ -7,6 +7,7 @@ CHANGELOG
|
|||||||
* @gkatsev made the first emulated text track enabled by default ([view](https://github.com/videojs/video.js/pull/3248))
|
* @gkatsev made the first emulated text track enabled by default ([view](https://github.com/videojs/video.js/pull/3248))
|
||||||
* @gkatsev fixed removeRemoteTextTracks not working with return value from addRemoteTextTracks ([view](https://github.com/videojs/video.js/pull/3253))
|
* @gkatsev fixed removeRemoteTextTracks not working with return value from addRemoteTextTracks ([view](https://github.com/videojs/video.js/pull/3253))
|
||||||
* @forbesjo added back the background color to the poster ([view](https://github.com/videojs/video.js/pull/3267))
|
* @forbesjo added back the background color to the poster ([view](https://github.com/videojs/video.js/pull/3267))
|
||||||
|
* @gkatsev fixed text track tests for older IEs ([view](https://github.com/videojs/video.js/pull/3269))
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
@ -87,29 +87,29 @@ test('should get tag, source, and track settings', function(){
|
|||||||
var tag = document.getElementById('example_1');
|
var tag = document.getElementById('example_1');
|
||||||
var player = TestHelpers.makePlayer({}, tag);
|
var player = TestHelpers.makePlayer({}, tag);
|
||||||
|
|
||||||
ok(player.options_['autoplay'] === true);
|
equal(player.options_.autoplay, true, 'autoplay is set to true');
|
||||||
ok(player.options_['preload'] === 'none'); // No extern. Use string.
|
equal(player.options_.preload, 'none', 'preload is set to none');
|
||||||
ok(player.options_['id'] === 'example_1');
|
equal(player.options_.id, 'example_1', 'id is set to example_1');
|
||||||
ok(player.options_['sources'].length === 2);
|
equal(player.options_.sources.length, 2, 'we have two sources');
|
||||||
ok(player.options_['sources'][0].src === 'http://google.com');
|
equal(player.options_.sources[0].src, 'http://google.com', 'first source is google.com');
|
||||||
ok(player.options_['sources'][0].type === 'video/mp4');
|
equal(player.options_.sources[0].type, 'video/mp4', 'first time is video/mp4');
|
||||||
ok(player.options_['sources'][1].type === 'video/webm');
|
equal(player.options_.sources[1].type, 'video/webm', 'second type is video/webm');
|
||||||
ok(player.options_['tracks'].length === 1);
|
equal(player.options_.tracks.length, 1, 'we have one text track');
|
||||||
ok(player.options_['tracks'][0]['kind'] === 'captions'); // No extern
|
equal(player.options_.tracks[0].kind, 'captions', 'the text track is a captions file');
|
||||||
ok(player.options_['tracks'][0]['attrtest'] === '');
|
equal(player.options_.tracks[0].attrtest, '', 'we have an empty attribute called attrtest');
|
||||||
|
|
||||||
ok(player.el().className.indexOf('video-js') !== -1, 'transferred class from tag to player div');
|
notEqual(player.el().className.indexOf('video-js'), -1, 'transferred class from tag to player div');
|
||||||
ok(player.el().id === 'example_1', 'transferred id from tag to player div');
|
equal(player.el().id,'example_1', 'transferred id from tag to player div');
|
||||||
|
|
||||||
ok(Player.players[player.id()] === player, 'player referenceable from global list');
|
equal(Player.players[player.id()], player, 'player referenceable from global list');
|
||||||
ok(tag.id !== player.id, 'tag ID no longer is the same as player ID');
|
notEqual(tag.id, player.id, 'tag ID no longer is the same as player ID');
|
||||||
ok(tag.className !== player.el().className, 'tag classname updated');
|
notEqual(tag.className, player.el().className, 'tag classname updated');
|
||||||
|
|
||||||
player.dispose();
|
player.dispose();
|
||||||
|
|
||||||
ok(tag['player'] !== player, 'tag player ref killed');
|
notEqual(tag['player'], player, 'tag player ref killed');
|
||||||
ok(!Player.players['example_1'], 'global player ref killed');
|
ok(!Player.players['example_1'], 'global player ref killed');
|
||||||
ok(player.el() === null, 'player el killed');
|
equal(player.el(), null, 'player el killed');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should asynchronously fire error events during source selection', function() {
|
test('should asynchronously fire error events during source selection', function() {
|
||||||
|
@ -480,7 +480,7 @@ test('default text tracks should show by default', function() {
|
|||||||
let tag = TestHelpers.makeTag();
|
let tag = TestHelpers.makeTag();
|
||||||
let capt = document.createElement('track');
|
let capt = document.createElement('track');
|
||||||
|
|
||||||
capt.kind = 'captions';
|
capt.setAttribute('kind', 'captions');
|
||||||
capt.setAttribute('default', 'default');
|
capt.setAttribute('default', 'default');
|
||||||
|
|
||||||
tag.appendChild(capt);
|
tag.appendChild(capt);
|
||||||
@ -505,9 +505,9 @@ test('default captions take precedence over default descriptions', function() {
|
|||||||
let desc = document.createElement('track');
|
let desc = document.createElement('track');
|
||||||
let capt = document.createElement('track');
|
let capt = document.createElement('track');
|
||||||
|
|
||||||
desc.kind = 'descriptions';
|
desc.setAttribute('kind', 'descriptions');
|
||||||
desc.setAttribute('default', 'default');
|
desc.setAttribute('default', 'default');
|
||||||
capt.kind = 'captions';
|
capt.setAttribute('kind', 'captions');
|
||||||
capt.setAttribute('default', 'default');
|
capt.setAttribute('default', 'default');
|
||||||
|
|
||||||
tag.appendChild(desc);
|
tag.appendChild(desc);
|
||||||
|
Loading…
Reference in New Issue
Block a user