1
0
mirror of https://github.com/videojs/video.js.git synced 2025-07-07 01:07:13 +02:00

feat: copy properties from <video-js> to the media el (#5039)

This commit is contained in:
Brandon Casey
2018-05-09 15:55:29 -04:00
committed by GitHub
parent 6147e5f7aa
commit c6617b24f7
2 changed files with 12 additions and 3 deletions

View File

@ -63,7 +63,7 @@ const setupEnv = function(env, testName) {
sinon.stub(log, 'error');
env.fixture = document.getElementById('qunit-fixture');
if (testName === 'change video el' || testName === 'change audio el') {
if ((/^change/i).test(testName)) {
Html5.prototype.movingMediaElementInDOM = false;
}
@ -73,7 +73,9 @@ const setupEnv = function(env, testName) {
});
videojs.hook('setup', env.hook);
if ((/audio/i).test(testName)) {
if ((/video-js/i).test(testName)) {
env.mediaEl = document.createElement('video-js');
} else if ((/audio/i).test(testName)) {
env.mediaEl = document.createElement('audio');
} else {
env.mediaEl = document.createElement('video');
@ -104,7 +106,7 @@ const setupAfterEach = function(totalSourcesets) {
};
};
const testTypes = ['video el', 'change video el', 'audio el', 'change audio el'];
const testTypes = ['video el', 'change video el', 'audio el', 'change audio el', 'video-js', 'change video-js el'];
QUnit[qunitFn]('sourceset', function(hooks) {
QUnit.module('source before player', (subhooks) => testTypes.forEach((testName) => {