mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
update
This commit is contained in:
parent
ed9048ec37
commit
14f492d68f
60 changed files with 27146 additions and 0 deletions
31
node_modules/videojs-playlist/test/util.js
generated
vendored
Normal file
31
node_modules/videojs-playlist/test/util.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
import document from 'global/document';
|
||||
import videojs from 'video.js';
|
||||
|
||||
/**
|
||||
* Destroy a fixture player.
|
||||
*
|
||||
* @param {Object} context
|
||||
* A testing context.
|
||||
*/
|
||||
export function destroyFixturePlayer(context) {
|
||||
context.player.dispose();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a fixture player.
|
||||
*
|
||||
* @param {Object} context
|
||||
* A testing context.
|
||||
*/
|
||||
export function createFixturePlayer(context) {
|
||||
context.video = document.createElement('video');
|
||||
context.fixture = document.querySelector('#qunit-fixture');
|
||||
context.fixture.appendChild(context.video);
|
||||
|
||||
context.playerIsReady = false;
|
||||
context.player = videojs(context.video, {}, () => {
|
||||
context.playerIsReady = true;
|
||||
});
|
||||
|
||||
context.player.playlist();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue