mirror of
https://github.com/videojs/video.js.git
synced 2024-12-25 02:42:10 +02:00
@heff fixed cross-platform track tests by switching to a fake tech. closes #2496
This commit is contained in:
parent
44fa9af226
commit
f7d1289593
@ -107,6 +107,7 @@ CHANGELOG
|
||||
* @gkatsev deep clone el for iOS to preserve tracks ([view](https://github.com/videojs/video.js/pull/2494))
|
||||
* @forbesjo switched automated testing to BrowserStack ([view](https://github.com/videojs/video.js/pull/2492))
|
||||
* @gkatsev fixed nativeControlsForTouch handling. Defaults to native controls on iphone and native android browsers. ([view](https://github.com/videojs/video.js/pull/2499))
|
||||
* @heff fixed cross-platform track tests by switching to a fake tech ([view](https://github.com/videojs/video.js/pull/2496))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -11,6 +11,7 @@ import Component from '../../../src/js/component.js';
|
||||
import * as browser from '../../../src/js/utils/browser.js';
|
||||
import TestHelpers from '../test-helpers.js';
|
||||
import document from 'global/document';
|
||||
import TechFaker from '../tech/tech-faker.js';
|
||||
|
||||
q.module('Tracks');
|
||||
|
||||
@ -289,23 +290,15 @@ test('html5 tech supports native text tracks if the video supports it, unless it
|
||||
});
|
||||
|
||||
test('when switching techs, we should not get a new text track', function() {
|
||||
var player = TestHelpers.makePlayer({
|
||||
html5: {
|
||||
nativeTextTracks: false
|
||||
}
|
||||
}),
|
||||
htmltracks,
|
||||
flashtracks;
|
||||
let player = TestHelpers.makePlayer();
|
||||
|
||||
player.loadTech('Html5');
|
||||
player.loadTech('TechFaker');
|
||||
let firstTracks = player.textTracks();
|
||||
|
||||
htmltracks = player.textTracks();
|
||||
player.loadTech('TechFaker');
|
||||
let secondTracks = player.textTracks();
|
||||
|
||||
player.loadTech('Flash');
|
||||
|
||||
flashtracks = player.textTracks();
|
||||
|
||||
ok(htmltracks === flashtracks, 'the tracks are equal');
|
||||
ok(firstTracks === secondTracks, 'the tracks are equal');
|
||||
});
|
||||
|
||||
if (Html5.supportsNativeTextTracks()) {
|
||||
|
Loading…
Reference in New Issue
Block a user