Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
18
VApp/node_modules/videojs-contrib-quality-levels/dist/types/plugin.d.ts
generated
vendored
Normal file
18
VApp/node_modules/videojs-contrib-quality-levels/dist/types/plugin.d.ts
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
export default qualityLevels;
|
||||
/**
|
||||
* A video.js plugin.
|
||||
*
|
||||
* In the plugin function, the value of `this` is a video.js `Player`
|
||||
* instance. You cannot rely on the player being in a "ready" state here,
|
||||
* depending on how the plugin is invoked. This may or may not be important
|
||||
* to you; if not, remove the wait for "ready"!
|
||||
*
|
||||
* @param {Object} options Plugin options object
|
||||
* @return {QualityLevelList} a list of QualityLevels
|
||||
*/
|
||||
declare function qualityLevels(options: any): QualityLevelList;
|
||||
declare namespace qualityLevels {
|
||||
export { VERSION };
|
||||
}
|
||||
import QualityLevelList from './quality-level-list.js';
|
||||
//# sourceMappingURL=plugin.d.ts.map
|
1
VApp/node_modules/videojs-contrib-quality-levels/dist/types/plugin.d.ts.map
generated
vendored
Normal file
1
VApp/node_modules/videojs-contrib-quality-levels/dist/types/plugin.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.js"],"names":[],"mappings":";AA+BA;;;;;;;;;;GAUG;AACH,8CAFY,gBAAgB,CAI3B;;;;6BA3C4B,yBAAyB"}
|
75
VApp/node_modules/videojs-contrib-quality-levels/dist/types/quality-level-list.d.ts
generated
vendored
Normal file
75
VApp/node_modules/videojs-contrib-quality-levels/dist/types/quality-level-list.d.ts
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
export default QualityLevelList;
|
||||
/**
|
||||
* A list of QualityLevels.
|
||||
*
|
||||
* interface QualityLevelList : EventTarget {
|
||||
* getter QualityLevel (unsigned long index);
|
||||
* readonly attribute unsigned long length;
|
||||
* readonly attribute long selectedIndex;
|
||||
*
|
||||
* void addQualityLevel(QualityLevel qualityLevel)
|
||||
* void removeQualityLevel(QualityLevel remove)
|
||||
* QualityLevel? getQualityLevelById(DOMString id);
|
||||
*
|
||||
* attribute EventHandler onchange;
|
||||
* attribute EventHandler onaddqualitylevel;
|
||||
* attribute EventHandler onremovequalitylevel;
|
||||
* };
|
||||
*
|
||||
* @extends videojs.EventTarget
|
||||
* @class QualityLevelList
|
||||
*/
|
||||
declare class QualityLevelList extends videojs.EventTarget {
|
||||
levels_: any[];
|
||||
selectedIndex_: number;
|
||||
/**
|
||||
* Adds a quality level to the list.
|
||||
*
|
||||
* @param {Representation|Object} representation The representation of the quality level
|
||||
* @param {string} representation.id Unique id of the QualityLevel
|
||||
* @param {number=} representation.width Resolution width of the QualityLevel
|
||||
* @param {number=} representation.height Resolution height of the QualityLevel
|
||||
* @param {number} representation.bandwidth Bitrate of the QualityLevel
|
||||
* @param {number=} representation.frameRate Frame-rate of the QualityLevel
|
||||
* @param {Function} representation.enabled Callback to enable/disable QualityLevel
|
||||
* @return {QualityLevel} the QualityLevel added to the list
|
||||
* @method addQualityLevel
|
||||
*/
|
||||
addQualityLevel(representation: Representation | any): QualityLevel;
|
||||
/**
|
||||
* Removes a quality level from the list.
|
||||
*
|
||||
* @param {QualityLevel} qualityLevel The QualityLevel to remove from the list.
|
||||
* @return {QualityLevel|null} the QualityLevel removed or null if nothing removed
|
||||
* @method removeQualityLevel
|
||||
*/
|
||||
removeQualityLevel(qualityLevel: QualityLevel): QualityLevel | null;
|
||||
/**
|
||||
* Searches for a QualityLevel with the given id.
|
||||
*
|
||||
* @param {string} id The id of the QualityLevel to find.
|
||||
* @return {QualityLevel|null} The QualityLevel with id, or null if not found.
|
||||
* @method getQualityLevelById
|
||||
*/
|
||||
getQualityLevelById(id: string): QualityLevel | null;
|
||||
/**
|
||||
* Resets the list of QualityLevels to empty
|
||||
*
|
||||
* @method dispose
|
||||
*/
|
||||
dispose(): void;
|
||||
/**
|
||||
* change - The selected QualityLevel has changed.
|
||||
* addqualitylevel - A QualityLevel has been added to the QualityLevelList.
|
||||
* removequalitylevel - A QualityLevel has been removed from the QualityLevelList.
|
||||
*/
|
||||
allowedEvents_: {
|
||||
change: string;
|
||||
addqualitylevel: string;
|
||||
removequalitylevel: string;
|
||||
};
|
||||
[Symbol.iterator]: () => IterableIterator<any>;
|
||||
}
|
||||
import videojs from 'video.js';
|
||||
import QualityLevel from './quality-level.js';
|
||||
//# sourceMappingURL=quality-level-list.d.ts.map
|
1
VApp/node_modules/videojs-contrib-quality-levels/dist/types/quality-level-list.d.ts.map
generated
vendored
Normal file
1
VApp/node_modules/videojs-contrib-quality-levels/dist/types/quality-level-list.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"quality-level-list.d.ts","sourceRoot":"","sources":["../../src/quality-level-list.js"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IASI,eAAiB;IACjB,uBAAwB;IA+B1B;;;;;;;;;;;;OAYG;IACH,gCAVW,oBAAqB,GAOpB,YAAY,CA+BvB;IAED;;;;;;OAMG;IACH,iCAJW,YAAY,GACX,YAAY,GAAC,IAAI,CA2B5B;IAED;;;;;;OAMG;IACH,wBAJW,MAAM,GACL,YAAY,GAAC,IAAI,CAY5B;IAED;;;;OAIG;IACH,gBAGC;IAGH;;;;OAIG;IACH;;;;MAAyC;IAnHrC,+CAAmD;CA4GtD;oBAvKmB,UAAU;yBACL,oBAAoB"}
|
36
VApp/node_modules/videojs-contrib-quality-levels/dist/types/quality-level.d.ts
generated
vendored
Normal file
36
VApp/node_modules/videojs-contrib-quality-levels/dist/types/quality-level.d.ts
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
/**
|
||||
* A single QualityLevel.
|
||||
*
|
||||
* interface QualityLevel {
|
||||
* readonly attribute DOMString id;
|
||||
* attribute DOMString label;
|
||||
* readonly attribute long width;
|
||||
* readonly attribute long height;
|
||||
* readonly attribute long bitrate;
|
||||
* attribute boolean enabled;
|
||||
* };
|
||||
*
|
||||
* @class QualityLevel
|
||||
*/
|
||||
export default class QualityLevel {
|
||||
/**
|
||||
* Creates a QualityLevel
|
||||
*
|
||||
* @param {Representation|Object} representation The representation of the quality level
|
||||
* @param {string} representation.id Unique id of the QualityLevel
|
||||
* @param {number=} representation.width Resolution width of the QualityLevel
|
||||
* @param {number=} representation.height Resolution height of the QualityLevel
|
||||
* @param {number} representation.bandwidth Bitrate of the QualityLevel
|
||||
* @param {number=} representation.frameRate Frame-rate of the QualityLevel
|
||||
* @param {Function} representation.enabled Callback to enable/disable QualityLevel
|
||||
*/
|
||||
constructor(representation: Representation | any);
|
||||
id: any;
|
||||
label: any;
|
||||
width: any;
|
||||
height: any;
|
||||
bitrate: any;
|
||||
frameRate: any;
|
||||
enabled_: any;
|
||||
}
|
||||
//# sourceMappingURL=quality-level.d.ts.map
|
1
VApp/node_modules/videojs-contrib-quality-levels/dist/types/quality-level.d.ts.map
generated
vendored
Normal file
1
VApp/node_modules/videojs-contrib-quality-levels/dist/types/quality-level.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"quality-level.d.ts","sourceRoot":"","sources":["../../src/quality-level.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH;IAEE;;;;;;;;;;OAUG;IACH,4BARW,oBAAqB,EAyC/B;IA7BC,QAA4B;IAC5B,WAAsB;IACtB,WAAkC;IAClC,YAAoC;IACpC,aAAwC;IACxC,eAA0C;IAC1C,cAAuC;CAwB1C"}
|
281
VApp/node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.cjs.js
generated
vendored
Normal file
281
VApp/node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.cjs.js
generated
vendored
Normal file
@ -0,0 +1,281 @@
|
||||
/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */
|
||||
'use strict';
|
||||
|
||||
var videojs = require('video.js');
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var videojs__default = /*#__PURE__*/_interopDefaultLegacy(videojs);
|
||||
|
||||
/**
|
||||
* A single QualityLevel.
|
||||
*
|
||||
* interface QualityLevel {
|
||||
* readonly attribute DOMString id;
|
||||
* attribute DOMString label;
|
||||
* readonly attribute long width;
|
||||
* readonly attribute long height;
|
||||
* readonly attribute long bitrate;
|
||||
* attribute boolean enabled;
|
||||
* };
|
||||
*
|
||||
* @class QualityLevel
|
||||
*/
|
||||
class QualityLevel {
|
||||
/**
|
||||
* Creates a QualityLevel
|
||||
*
|
||||
* @param {Representation|Object} representation The representation of the quality level
|
||||
* @param {string} representation.id Unique id of the QualityLevel
|
||||
* @param {number=} representation.width Resolution width of the QualityLevel
|
||||
* @param {number=} representation.height Resolution height of the QualityLevel
|
||||
* @param {number} representation.bandwidth Bitrate of the QualityLevel
|
||||
* @param {number=} representation.frameRate Frame-rate of the QualityLevel
|
||||
* @param {Function} representation.enabled Callback to enable/disable QualityLevel
|
||||
*/
|
||||
constructor(representation) {
|
||||
let level = this; // eslint-disable-line
|
||||
|
||||
level.id = representation.id;
|
||||
level.label = level.id;
|
||||
level.width = representation.width;
|
||||
level.height = representation.height;
|
||||
level.bitrate = representation.bandwidth;
|
||||
level.frameRate = representation.frameRate;
|
||||
level.enabled_ = representation.enabled;
|
||||
Object.defineProperty(level, 'enabled', {
|
||||
/**
|
||||
* Get whether the QualityLevel is enabled.
|
||||
*
|
||||
* @return {boolean} True if the QualityLevel is enabled.
|
||||
*/
|
||||
get() {
|
||||
return level.enabled_();
|
||||
},
|
||||
/**
|
||||
* Enable or disable the QualityLevel.
|
||||
*
|
||||
* @param {boolean} enable true to enable QualityLevel, false to disable.
|
||||
*/
|
||||
set(enable) {
|
||||
level.enabled_(enable);
|
||||
}
|
||||
});
|
||||
return level;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of QualityLevels.
|
||||
*
|
||||
* interface QualityLevelList : EventTarget {
|
||||
* getter QualityLevel (unsigned long index);
|
||||
* readonly attribute unsigned long length;
|
||||
* readonly attribute long selectedIndex;
|
||||
*
|
||||
* void addQualityLevel(QualityLevel qualityLevel)
|
||||
* void removeQualityLevel(QualityLevel remove)
|
||||
* QualityLevel? getQualityLevelById(DOMString id);
|
||||
*
|
||||
* attribute EventHandler onchange;
|
||||
* attribute EventHandler onaddqualitylevel;
|
||||
* attribute EventHandler onremovequalitylevel;
|
||||
* };
|
||||
*
|
||||
* @extends videojs.EventTarget
|
||||
* @class QualityLevelList
|
||||
*/
|
||||
class QualityLevelList extends videojs__default["default"].EventTarget {
|
||||
/**
|
||||
* Creates a QualityLevelList.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
let list = this; // eslint-disable-line
|
||||
|
||||
list.levels_ = [];
|
||||
list.selectedIndex_ = -1;
|
||||
|
||||
/**
|
||||
* Get the index of the currently selected QualityLevel.
|
||||
*
|
||||
* @returns {number} The index of the selected QualityLevel. -1 if none selected.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(list, 'selectedIndex', {
|
||||
get() {
|
||||
return list.selectedIndex_;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Get the length of the list of QualityLevels.
|
||||
*
|
||||
* @returns {number} The length of the list.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(list, 'length', {
|
||||
get() {
|
||||
return list.levels_.length;
|
||||
}
|
||||
});
|
||||
list[Symbol.iterator] = () => list.levels_.values();
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a quality level to the list.
|
||||
*
|
||||
* @param {Representation|Object} representation The representation of the quality level
|
||||
* @param {string} representation.id Unique id of the QualityLevel
|
||||
* @param {number=} representation.width Resolution width of the QualityLevel
|
||||
* @param {number=} representation.height Resolution height of the QualityLevel
|
||||
* @param {number} representation.bandwidth Bitrate of the QualityLevel
|
||||
* @param {number=} representation.frameRate Frame-rate of the QualityLevel
|
||||
* @param {Function} representation.enabled Callback to enable/disable QualityLevel
|
||||
* @return {QualityLevel} the QualityLevel added to the list
|
||||
* @method addQualityLevel
|
||||
*/
|
||||
addQualityLevel(representation) {
|
||||
let qualityLevel = this.getQualityLevelById(representation.id);
|
||||
|
||||
// Do not add duplicate quality levels
|
||||
if (qualityLevel) {
|
||||
return qualityLevel;
|
||||
}
|
||||
const index = this.levels_.length;
|
||||
qualityLevel = new QualityLevel(representation);
|
||||
if (!('' + index in this)) {
|
||||
Object.defineProperty(this, index, {
|
||||
get() {
|
||||
return this.levels_[index];
|
||||
}
|
||||
});
|
||||
}
|
||||
this.levels_.push(qualityLevel);
|
||||
this.trigger({
|
||||
qualityLevel,
|
||||
type: 'addqualitylevel'
|
||||
});
|
||||
return qualityLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a quality level from the list.
|
||||
*
|
||||
* @param {QualityLevel} qualityLevel The QualityLevel to remove from the list.
|
||||
* @return {QualityLevel|null} the QualityLevel removed or null if nothing removed
|
||||
* @method removeQualityLevel
|
||||
*/
|
||||
removeQualityLevel(qualityLevel) {
|
||||
let removed = null;
|
||||
for (let i = 0, l = this.length; i < l; i++) {
|
||||
if (this[i] === qualityLevel) {
|
||||
removed = this.levels_.splice(i, 1)[0];
|
||||
if (this.selectedIndex_ === i) {
|
||||
this.selectedIndex_ = -1;
|
||||
} else if (this.selectedIndex_ > i) {
|
||||
this.selectedIndex_--;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (removed) {
|
||||
this.trigger({
|
||||
qualityLevel,
|
||||
type: 'removequalitylevel'
|
||||
});
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches for a QualityLevel with the given id.
|
||||
*
|
||||
* @param {string} id The id of the QualityLevel to find.
|
||||
* @return {QualityLevel|null} The QualityLevel with id, or null if not found.
|
||||
* @method getQualityLevelById
|
||||
*/
|
||||
getQualityLevelById(id) {
|
||||
for (let i = 0, l = this.length; i < l; i++) {
|
||||
const level = this[i];
|
||||
if (level.id === id) {
|
||||
return level;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the list of QualityLevels to empty
|
||||
*
|
||||
* @method dispose
|
||||
*/
|
||||
dispose() {
|
||||
this.selectedIndex_ = -1;
|
||||
this.levels_.length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* change - The selected QualityLevel has changed.
|
||||
* addqualitylevel - A QualityLevel has been added to the QualityLevelList.
|
||||
* removequalitylevel - A QualityLevel has been removed from the QualityLevelList.
|
||||
*/
|
||||
QualityLevelList.prototype.allowedEvents_ = {
|
||||
change: 'change',
|
||||
addqualitylevel: 'addqualitylevel',
|
||||
removequalitylevel: 'removequalitylevel'
|
||||
};
|
||||
|
||||
// emulate attribute EventHandler support to allow for feature detection
|
||||
for (const event in QualityLevelList.prototype.allowedEvents_) {
|
||||
QualityLevelList.prototype['on' + event] = null;
|
||||
}
|
||||
|
||||
var version = "4.1.0";
|
||||
|
||||
/**
|
||||
* Initialization function for the qualityLevels plugin. Sets up the QualityLevelList and
|
||||
* event handlers.
|
||||
*
|
||||
* @param {Player} player Player object.
|
||||
* @param {Object} options Plugin options object.
|
||||
* @return {QualityLevelList} a list of QualityLevels
|
||||
*/
|
||||
const initPlugin = function (player, options) {
|
||||
const originalPluginFn = player.qualityLevels;
|
||||
const qualityLevelList = new QualityLevelList();
|
||||
const disposeHandler = function () {
|
||||
qualityLevelList.dispose();
|
||||
player.qualityLevels = originalPluginFn;
|
||||
player.off('dispose', disposeHandler);
|
||||
};
|
||||
player.on('dispose', disposeHandler);
|
||||
player.qualityLevels = () => qualityLevelList;
|
||||
player.qualityLevels.VERSION = version;
|
||||
return qualityLevelList;
|
||||
};
|
||||
|
||||
/**
|
||||
* A video.js plugin.
|
||||
*
|
||||
* In the plugin function, the value of `this` is a video.js `Player`
|
||||
* instance. You cannot rely on the player being in a "ready" state here,
|
||||
* depending on how the plugin is invoked. This may or may not be important
|
||||
* to you; if not, remove the wait for "ready"!
|
||||
*
|
||||
* @param {Object} options Plugin options object
|
||||
* @return {QualityLevelList} a list of QualityLevels
|
||||
*/
|
||||
const qualityLevels = function (options) {
|
||||
return initPlugin(this, videojs__default["default"].obj.merge({}, options));
|
||||
};
|
||||
|
||||
// Register the plugin with video.js.
|
||||
videojs__default["default"].registerPlugin('qualityLevels', qualityLevels);
|
||||
|
||||
// Include the version number.
|
||||
qualityLevels.VERSION = version;
|
||||
|
||||
module.exports = qualityLevels;
|
275
VApp/node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js
generated
vendored
Normal file
275
VApp/node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js
generated
vendored
Normal file
@ -0,0 +1,275 @@
|
||||
/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */
|
||||
import videojs from 'video.js';
|
||||
|
||||
/**
|
||||
* A single QualityLevel.
|
||||
*
|
||||
* interface QualityLevel {
|
||||
* readonly attribute DOMString id;
|
||||
* attribute DOMString label;
|
||||
* readonly attribute long width;
|
||||
* readonly attribute long height;
|
||||
* readonly attribute long bitrate;
|
||||
* attribute boolean enabled;
|
||||
* };
|
||||
*
|
||||
* @class QualityLevel
|
||||
*/
|
||||
class QualityLevel {
|
||||
/**
|
||||
* Creates a QualityLevel
|
||||
*
|
||||
* @param {Representation|Object} representation The representation of the quality level
|
||||
* @param {string} representation.id Unique id of the QualityLevel
|
||||
* @param {number=} representation.width Resolution width of the QualityLevel
|
||||
* @param {number=} representation.height Resolution height of the QualityLevel
|
||||
* @param {number} representation.bandwidth Bitrate of the QualityLevel
|
||||
* @param {number=} representation.frameRate Frame-rate of the QualityLevel
|
||||
* @param {Function} representation.enabled Callback to enable/disable QualityLevel
|
||||
*/
|
||||
constructor(representation) {
|
||||
let level = this; // eslint-disable-line
|
||||
|
||||
level.id = representation.id;
|
||||
level.label = level.id;
|
||||
level.width = representation.width;
|
||||
level.height = representation.height;
|
||||
level.bitrate = representation.bandwidth;
|
||||
level.frameRate = representation.frameRate;
|
||||
level.enabled_ = representation.enabled;
|
||||
Object.defineProperty(level, 'enabled', {
|
||||
/**
|
||||
* Get whether the QualityLevel is enabled.
|
||||
*
|
||||
* @return {boolean} True if the QualityLevel is enabled.
|
||||
*/
|
||||
get() {
|
||||
return level.enabled_();
|
||||
},
|
||||
/**
|
||||
* Enable or disable the QualityLevel.
|
||||
*
|
||||
* @param {boolean} enable true to enable QualityLevel, false to disable.
|
||||
*/
|
||||
set(enable) {
|
||||
level.enabled_(enable);
|
||||
}
|
||||
});
|
||||
return level;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of QualityLevels.
|
||||
*
|
||||
* interface QualityLevelList : EventTarget {
|
||||
* getter QualityLevel (unsigned long index);
|
||||
* readonly attribute unsigned long length;
|
||||
* readonly attribute long selectedIndex;
|
||||
*
|
||||
* void addQualityLevel(QualityLevel qualityLevel)
|
||||
* void removeQualityLevel(QualityLevel remove)
|
||||
* QualityLevel? getQualityLevelById(DOMString id);
|
||||
*
|
||||
* attribute EventHandler onchange;
|
||||
* attribute EventHandler onaddqualitylevel;
|
||||
* attribute EventHandler onremovequalitylevel;
|
||||
* };
|
||||
*
|
||||
* @extends videojs.EventTarget
|
||||
* @class QualityLevelList
|
||||
*/
|
||||
class QualityLevelList extends videojs.EventTarget {
|
||||
/**
|
||||
* Creates a QualityLevelList.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
let list = this; // eslint-disable-line
|
||||
|
||||
list.levels_ = [];
|
||||
list.selectedIndex_ = -1;
|
||||
|
||||
/**
|
||||
* Get the index of the currently selected QualityLevel.
|
||||
*
|
||||
* @returns {number} The index of the selected QualityLevel. -1 if none selected.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(list, 'selectedIndex', {
|
||||
get() {
|
||||
return list.selectedIndex_;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Get the length of the list of QualityLevels.
|
||||
*
|
||||
* @returns {number} The length of the list.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(list, 'length', {
|
||||
get() {
|
||||
return list.levels_.length;
|
||||
}
|
||||
});
|
||||
list[Symbol.iterator] = () => list.levels_.values();
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a quality level to the list.
|
||||
*
|
||||
* @param {Representation|Object} representation The representation of the quality level
|
||||
* @param {string} representation.id Unique id of the QualityLevel
|
||||
* @param {number=} representation.width Resolution width of the QualityLevel
|
||||
* @param {number=} representation.height Resolution height of the QualityLevel
|
||||
* @param {number} representation.bandwidth Bitrate of the QualityLevel
|
||||
* @param {number=} representation.frameRate Frame-rate of the QualityLevel
|
||||
* @param {Function} representation.enabled Callback to enable/disable QualityLevel
|
||||
* @return {QualityLevel} the QualityLevel added to the list
|
||||
* @method addQualityLevel
|
||||
*/
|
||||
addQualityLevel(representation) {
|
||||
let qualityLevel = this.getQualityLevelById(representation.id);
|
||||
|
||||
// Do not add duplicate quality levels
|
||||
if (qualityLevel) {
|
||||
return qualityLevel;
|
||||
}
|
||||
const index = this.levels_.length;
|
||||
qualityLevel = new QualityLevel(representation);
|
||||
if (!('' + index in this)) {
|
||||
Object.defineProperty(this, index, {
|
||||
get() {
|
||||
return this.levels_[index];
|
||||
}
|
||||
});
|
||||
}
|
||||
this.levels_.push(qualityLevel);
|
||||
this.trigger({
|
||||
qualityLevel,
|
||||
type: 'addqualitylevel'
|
||||
});
|
||||
return qualityLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a quality level from the list.
|
||||
*
|
||||
* @param {QualityLevel} qualityLevel The QualityLevel to remove from the list.
|
||||
* @return {QualityLevel|null} the QualityLevel removed or null if nothing removed
|
||||
* @method removeQualityLevel
|
||||
*/
|
||||
removeQualityLevel(qualityLevel) {
|
||||
let removed = null;
|
||||
for (let i = 0, l = this.length; i < l; i++) {
|
||||
if (this[i] === qualityLevel) {
|
||||
removed = this.levels_.splice(i, 1)[0];
|
||||
if (this.selectedIndex_ === i) {
|
||||
this.selectedIndex_ = -1;
|
||||
} else if (this.selectedIndex_ > i) {
|
||||
this.selectedIndex_--;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (removed) {
|
||||
this.trigger({
|
||||
qualityLevel,
|
||||
type: 'removequalitylevel'
|
||||
});
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches for a QualityLevel with the given id.
|
||||
*
|
||||
* @param {string} id The id of the QualityLevel to find.
|
||||
* @return {QualityLevel|null} The QualityLevel with id, or null if not found.
|
||||
* @method getQualityLevelById
|
||||
*/
|
||||
getQualityLevelById(id) {
|
||||
for (let i = 0, l = this.length; i < l; i++) {
|
||||
const level = this[i];
|
||||
if (level.id === id) {
|
||||
return level;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the list of QualityLevels to empty
|
||||
*
|
||||
* @method dispose
|
||||
*/
|
||||
dispose() {
|
||||
this.selectedIndex_ = -1;
|
||||
this.levels_.length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* change - The selected QualityLevel has changed.
|
||||
* addqualitylevel - A QualityLevel has been added to the QualityLevelList.
|
||||
* removequalitylevel - A QualityLevel has been removed from the QualityLevelList.
|
||||
*/
|
||||
QualityLevelList.prototype.allowedEvents_ = {
|
||||
change: 'change',
|
||||
addqualitylevel: 'addqualitylevel',
|
||||
removequalitylevel: 'removequalitylevel'
|
||||
};
|
||||
|
||||
// emulate attribute EventHandler support to allow for feature detection
|
||||
for (const event in QualityLevelList.prototype.allowedEvents_) {
|
||||
QualityLevelList.prototype['on' + event] = null;
|
||||
}
|
||||
|
||||
var version = "4.1.0";
|
||||
|
||||
/**
|
||||
* Initialization function for the qualityLevels plugin. Sets up the QualityLevelList and
|
||||
* event handlers.
|
||||
*
|
||||
* @param {Player} player Player object.
|
||||
* @param {Object} options Plugin options object.
|
||||
* @return {QualityLevelList} a list of QualityLevels
|
||||
*/
|
||||
const initPlugin = function (player, options) {
|
||||
const originalPluginFn = player.qualityLevels;
|
||||
const qualityLevelList = new QualityLevelList();
|
||||
const disposeHandler = function () {
|
||||
qualityLevelList.dispose();
|
||||
player.qualityLevels = originalPluginFn;
|
||||
player.off('dispose', disposeHandler);
|
||||
};
|
||||
player.on('dispose', disposeHandler);
|
||||
player.qualityLevels = () => qualityLevelList;
|
||||
player.qualityLevels.VERSION = version;
|
||||
return qualityLevelList;
|
||||
};
|
||||
|
||||
/**
|
||||
* A video.js plugin.
|
||||
*
|
||||
* In the plugin function, the value of `this` is a video.js `Player`
|
||||
* instance. You cannot rely on the player being in a "ready" state here,
|
||||
* depending on how the plugin is invoked. This may or may not be important
|
||||
* to you; if not, remove the wait for "ready"!
|
||||
*
|
||||
* @param {Object} options Plugin options object
|
||||
* @return {QualityLevelList} a list of QualityLevels
|
||||
*/
|
||||
const qualityLevels = function (options) {
|
||||
return initPlugin(this, videojs.obj.merge({}, options));
|
||||
};
|
||||
|
||||
// Register the plugin with video.js.
|
||||
videojs.registerPlugin('qualityLevels', qualityLevels);
|
||||
|
||||
// Include the version number.
|
||||
qualityLevels.VERSION = version;
|
||||
|
||||
export { qualityLevels as default };
|
285
VApp/node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.js
generated
vendored
Normal file
285
VApp/node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.js
generated
vendored
Normal file
@ -0,0 +1,285 @@
|
||||
/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('video.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['video.js'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.videojsContribQualityLevels = factory(global.videojs));
|
||||
})(this, (function (videojs) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var videojs__default = /*#__PURE__*/_interopDefaultLegacy(videojs);
|
||||
|
||||
/**
|
||||
* A single QualityLevel.
|
||||
*
|
||||
* interface QualityLevel {
|
||||
* readonly attribute DOMString id;
|
||||
* attribute DOMString label;
|
||||
* readonly attribute long width;
|
||||
* readonly attribute long height;
|
||||
* readonly attribute long bitrate;
|
||||
* attribute boolean enabled;
|
||||
* };
|
||||
*
|
||||
* @class QualityLevel
|
||||
*/
|
||||
class QualityLevel {
|
||||
/**
|
||||
* Creates a QualityLevel
|
||||
*
|
||||
* @param {Representation|Object} representation The representation of the quality level
|
||||
* @param {string} representation.id Unique id of the QualityLevel
|
||||
* @param {number=} representation.width Resolution width of the QualityLevel
|
||||
* @param {number=} representation.height Resolution height of the QualityLevel
|
||||
* @param {number} representation.bandwidth Bitrate of the QualityLevel
|
||||
* @param {number=} representation.frameRate Frame-rate of the QualityLevel
|
||||
* @param {Function} representation.enabled Callback to enable/disable QualityLevel
|
||||
*/
|
||||
constructor(representation) {
|
||||
let level = this; // eslint-disable-line
|
||||
|
||||
level.id = representation.id;
|
||||
level.label = level.id;
|
||||
level.width = representation.width;
|
||||
level.height = representation.height;
|
||||
level.bitrate = representation.bandwidth;
|
||||
level.frameRate = representation.frameRate;
|
||||
level.enabled_ = representation.enabled;
|
||||
Object.defineProperty(level, 'enabled', {
|
||||
/**
|
||||
* Get whether the QualityLevel is enabled.
|
||||
*
|
||||
* @return {boolean} True if the QualityLevel is enabled.
|
||||
*/
|
||||
get() {
|
||||
return level.enabled_();
|
||||
},
|
||||
/**
|
||||
* Enable or disable the QualityLevel.
|
||||
*
|
||||
* @param {boolean} enable true to enable QualityLevel, false to disable.
|
||||
*/
|
||||
set(enable) {
|
||||
level.enabled_(enable);
|
||||
}
|
||||
});
|
||||
return level;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of QualityLevels.
|
||||
*
|
||||
* interface QualityLevelList : EventTarget {
|
||||
* getter QualityLevel (unsigned long index);
|
||||
* readonly attribute unsigned long length;
|
||||
* readonly attribute long selectedIndex;
|
||||
*
|
||||
* void addQualityLevel(QualityLevel qualityLevel)
|
||||
* void removeQualityLevel(QualityLevel remove)
|
||||
* QualityLevel? getQualityLevelById(DOMString id);
|
||||
*
|
||||
* attribute EventHandler onchange;
|
||||
* attribute EventHandler onaddqualitylevel;
|
||||
* attribute EventHandler onremovequalitylevel;
|
||||
* };
|
||||
*
|
||||
* @extends videojs.EventTarget
|
||||
* @class QualityLevelList
|
||||
*/
|
||||
class QualityLevelList extends videojs__default["default"].EventTarget {
|
||||
/**
|
||||
* Creates a QualityLevelList.
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
let list = this; // eslint-disable-line
|
||||
|
||||
list.levels_ = [];
|
||||
list.selectedIndex_ = -1;
|
||||
|
||||
/**
|
||||
* Get the index of the currently selected QualityLevel.
|
||||
*
|
||||
* @returns {number} The index of the selected QualityLevel. -1 if none selected.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(list, 'selectedIndex', {
|
||||
get() {
|
||||
return list.selectedIndex_;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Get the length of the list of QualityLevels.
|
||||
*
|
||||
* @returns {number} The length of the list.
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(list, 'length', {
|
||||
get() {
|
||||
return list.levels_.length;
|
||||
}
|
||||
});
|
||||
list[Symbol.iterator] = () => list.levels_.values();
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a quality level to the list.
|
||||
*
|
||||
* @param {Representation|Object} representation The representation of the quality level
|
||||
* @param {string} representation.id Unique id of the QualityLevel
|
||||
* @param {number=} representation.width Resolution width of the QualityLevel
|
||||
* @param {number=} representation.height Resolution height of the QualityLevel
|
||||
* @param {number} representation.bandwidth Bitrate of the QualityLevel
|
||||
* @param {number=} representation.frameRate Frame-rate of the QualityLevel
|
||||
* @param {Function} representation.enabled Callback to enable/disable QualityLevel
|
||||
* @return {QualityLevel} the QualityLevel added to the list
|
||||
* @method addQualityLevel
|
||||
*/
|
||||
addQualityLevel(representation) {
|
||||
let qualityLevel = this.getQualityLevelById(representation.id);
|
||||
|
||||
// Do not add duplicate quality levels
|
||||
if (qualityLevel) {
|
||||
return qualityLevel;
|
||||
}
|
||||
const index = this.levels_.length;
|
||||
qualityLevel = new QualityLevel(representation);
|
||||
if (!('' + index in this)) {
|
||||
Object.defineProperty(this, index, {
|
||||
get() {
|
||||
return this.levels_[index];
|
||||
}
|
||||
});
|
||||
}
|
||||
this.levels_.push(qualityLevel);
|
||||
this.trigger({
|
||||
qualityLevel,
|
||||
type: 'addqualitylevel'
|
||||
});
|
||||
return qualityLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a quality level from the list.
|
||||
*
|
||||
* @param {QualityLevel} qualityLevel The QualityLevel to remove from the list.
|
||||
* @return {QualityLevel|null} the QualityLevel removed or null if nothing removed
|
||||
* @method removeQualityLevel
|
||||
*/
|
||||
removeQualityLevel(qualityLevel) {
|
||||
let removed = null;
|
||||
for (let i = 0, l = this.length; i < l; i++) {
|
||||
if (this[i] === qualityLevel) {
|
||||
removed = this.levels_.splice(i, 1)[0];
|
||||
if (this.selectedIndex_ === i) {
|
||||
this.selectedIndex_ = -1;
|
||||
} else if (this.selectedIndex_ > i) {
|
||||
this.selectedIndex_--;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (removed) {
|
||||
this.trigger({
|
||||
qualityLevel,
|
||||
type: 'removequalitylevel'
|
||||
});
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches for a QualityLevel with the given id.
|
||||
*
|
||||
* @param {string} id The id of the QualityLevel to find.
|
||||
* @return {QualityLevel|null} The QualityLevel with id, or null if not found.
|
||||
* @method getQualityLevelById
|
||||
*/
|
||||
getQualityLevelById(id) {
|
||||
for (let i = 0, l = this.length; i < l; i++) {
|
||||
const level = this[i];
|
||||
if (level.id === id) {
|
||||
return level;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the list of QualityLevels to empty
|
||||
*
|
||||
* @method dispose
|
||||
*/
|
||||
dispose() {
|
||||
this.selectedIndex_ = -1;
|
||||
this.levels_.length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* change - The selected QualityLevel has changed.
|
||||
* addqualitylevel - A QualityLevel has been added to the QualityLevelList.
|
||||
* removequalitylevel - A QualityLevel has been removed from the QualityLevelList.
|
||||
*/
|
||||
QualityLevelList.prototype.allowedEvents_ = {
|
||||
change: 'change',
|
||||
addqualitylevel: 'addqualitylevel',
|
||||
removequalitylevel: 'removequalitylevel'
|
||||
};
|
||||
|
||||
// emulate attribute EventHandler support to allow for feature detection
|
||||
for (const event in QualityLevelList.prototype.allowedEvents_) {
|
||||
QualityLevelList.prototype['on' + event] = null;
|
||||
}
|
||||
|
||||
var version = "4.1.0";
|
||||
|
||||
/**
|
||||
* Initialization function for the qualityLevels plugin. Sets up the QualityLevelList and
|
||||
* event handlers.
|
||||
*
|
||||
* @param {Player} player Player object.
|
||||
* @param {Object} options Plugin options object.
|
||||
* @return {QualityLevelList} a list of QualityLevels
|
||||
*/
|
||||
const initPlugin = function (player, options) {
|
||||
const originalPluginFn = player.qualityLevels;
|
||||
const qualityLevelList = new QualityLevelList();
|
||||
const disposeHandler = function () {
|
||||
qualityLevelList.dispose();
|
||||
player.qualityLevels = originalPluginFn;
|
||||
player.off('dispose', disposeHandler);
|
||||
};
|
||||
player.on('dispose', disposeHandler);
|
||||
player.qualityLevels = () => qualityLevelList;
|
||||
player.qualityLevels.VERSION = version;
|
||||
return qualityLevelList;
|
||||
};
|
||||
|
||||
/**
|
||||
* A video.js plugin.
|
||||
*
|
||||
* In the plugin function, the value of `this` is a video.js `Player`
|
||||
* instance. You cannot rely on the player being in a "ready" state here,
|
||||
* depending on how the plugin is invoked. This may or may not be important
|
||||
* to you; if not, remove the wait for "ready"!
|
||||
*
|
||||
* @param {Object} options Plugin options object
|
||||
* @return {QualityLevelList} a list of QualityLevels
|
||||
*/
|
||||
const qualityLevels = function (options) {
|
||||
return initPlugin(this, videojs__default["default"].obj.merge({}, options));
|
||||
};
|
||||
|
||||
// Register the plugin with video.js.
|
||||
videojs__default["default"].registerPlugin('qualityLevels', qualityLevels);
|
||||
|
||||
// Include the version number.
|
||||
qualityLevels.VERSION = version;
|
||||
|
||||
return qualityLevels;
|
||||
|
||||
}));
|
2
VApp/node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.min.js
generated
vendored
Normal file
2
VApp/node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.min.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).videojsContribQualityLevels=t(e.videojs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=t(e);class i{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get:()=>t.enabled_(),set(e){t.enabled_(e)}}),t}}class s extends l.default.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get:()=>e.selectedIndex_}),Object.defineProperty(e,"length",{get:()=>e.levels_.length}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const l=this.levels_.length;return t=new i(e),""+l in this||Object.defineProperty(this,l,{get(){return this.levels_[l]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let l=0,i=this.length;l<i;l++)if(this[l]===e){t=this.levels_.splice(l,1)[0],this.selectedIndex_===l?this.selectedIndex_=-1:this.selectedIndex_>l&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,l=this.length;t<l;t++){const l=this[t];if(l.id===e)return l}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}s.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const e in s.prototype.allowedEvents_)s.prototype["on"+e]=null;var n="4.1.0";const d=function(e){return function(e,t){const l=e.qualityLevels,i=new s,d=function(){i.dispose(),e.qualityLevels=l,e.off("dispose",d)};return e.on("dispose",d),e.qualityLevels=()=>i,e.qualityLevels.VERSION=n,i}(this,l.default.obj.merge({},e))};return l.default.registerPlugin("qualityLevels",d),d.VERSION=n,d}));
|
Reference in New Issue
Block a user