learngerman/maps/playerPlugins-audio.4aa8d1e...

1 line
9.9 KiB
Plaintext

{"version":3,"sources":["../node_modules/videojs-seek-buttons/dist/videojs-seek-buttons.js"],"names":["module","exports","videojs","_interopDefaultLegacy","e","videojs__default","createCommonjsModule","fn","basedir","path","require","base","commonjsRequire","undefined","Error","setPrototypeOf","_setPrototypeOf","o","p","Object","__proto__","__esModule","inheritsLoose","_inheritsLoose","subClass","superClass","prototype","create","constructor","version","Button","getComponent","defaults","forwardIndex","backIndex","registerPlugin","plugin","onPlayerReady","player","options","addClass","forward","controlBar","seekForward","addChild","direction","seconds","back","seekBack","seekButtons","_this","this","ready","mergeOptions","VERSION","SeekButton","_Button","_this2","call","options_","controlText","localize","replace","_proto","buildCSSClass","handleClick","now","player_","currentTime","registerComponent","factory"],"mappings":";qJAEgEA,EAAOC,QAG9D,SAAUC,GAAW,aAE7B,SAASC,EAAuBC,GAAK,OAAOA,GAAkB,kBAANA,GAAkB,YAAaA,EAAIA,EAAI,CAAE,QAAWA,GAE5G,IAAIC,EAAgCF,EAAsBD,GAE1D,SAASI,EAAqBC,EAAIC,EAASR,GAC1C,OAMGO,EANIP,EAAS,CACdS,KAAMD,EACNP,QAAS,GACTS,QAAS,SAAUD,EAAME,GACtB,OAAOC,EAAgBH,OAAgBI,IAATF,GAA+B,OAATA,EAAiBX,EAAOS,KAAOE,KAE1EX,EAAOC,SAAUD,EAAOC,QAGvC,SAASW,IACR,MAAM,IAAIE,MAAM,2EAGjB,IAAIC,EAAiBT,GAAqB,SAAUN,GAClD,SAASgB,EAAgBC,EAAGC,GAO1B,OANAlB,EAAOC,QAAUe,EAAkBG,OAAOJ,gBAAkB,SAAyBE,EAAGC,GAEtF,OADAD,EAAEG,UAAYF,EACPD,GAGTjB,EAAOC,QAAP,QAA4BD,EAAOC,QAASD,EAAOC,QAAQoB,YAAa,EACjEL,EAAgBC,EAAGC,GAG5BlB,EAAOC,QAAUe,EACjBhB,EAAOC,QAAP,QAA4BD,EAAOC,QAASD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ciC,EAAYC,GA8B1B,IAAIO,EAASR,EAAW7B,UA2BxB,OAzBAqC,EAAOC,cAAgB,WAQrB,MAAO,wBAA0Bb,KAAKQ,SAASd,UAAxC,SAAqEM,KAAKQ,SAASb,QAAU,IAAMU,EAAQ9B,UAAUsC,cAAcN,KAAKP,OAOjJY,EAAOE,YAAc,WACnB,IAAIC,EAAMf,KAAKgB,QAAQC,cAES,YAA5BjB,KAAKQ,SAASd,UAChBM,KAAKgB,QAAQC,YAAYF,EAAMf,KAAKQ,SAASb,SACR,SAA5BK,KAAKQ,SAASd,WACvBM,KAAKgB,QAAQC,YAAYF,EAAMf,KAAKQ,SAASb,UAI1CS,EA1DqB,CA2D5BzB,GAOF,OAJAzB,EAAgB,QAAYgE,kBAAkB,aAAcd,GAE5DpB,EAAe,cAAec,GAEvBA,EApMyEqB,CAAQ5D,EAAQ,O","file":"static/js/playerPlugins-audio.4aa8d1ef.chunk.js","sourcesContent":["/*! @name videojs-seek-buttons @version 2.0.1 @license Apache-2.0 */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('video.js')) :\n\ttypeof define === 'function' && define.amd ? define(['video.js'], factory) :\n\t(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.videojsSeekButtons = factory(global.videojs));\n}(this, (function (videojs) { 'use strict';\n\n\tfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\n\tvar videojs__default = /*#__PURE__*/_interopDefaultLegacy(videojs);\n\n\tfunction createCommonjsModule(fn, basedir, module) {\n\t\treturn module = {\n\t\t path: basedir,\n\t\t exports: {},\n\t\t require: function (path, base) {\n\t return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n\t }\n\t\t}, fn(module, module.exports), module.exports;\n\t}\n\n\tfunction commonjsRequire () {\n\t\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n\t}\n\n\tvar setPrototypeOf = createCommonjsModule(function (module) {\n\t function _setPrototypeOf(o, p) {\n\t module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n\t o.__proto__ = p;\n\t return o;\n\t };\n\n\t module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\t return _setPrototypeOf(o, p);\n\t }\n\n\t module.exports = _setPrototypeOf;\n\t module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\t});\n\n\tvar inheritsLoose = createCommonjsModule(function (module) {\n\t function _inheritsLoose(subClass, superClass) {\n\t subClass.prototype = Object.create(superClass.prototype);\n\t subClass.prototype.constructor = subClass;\n\t setPrototypeOf(subClass, superClass);\n\t }\n\n\t module.exports = _inheritsLoose;\n\t module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\t});\n\n\tvar version = \"2.0.1\";\n\n\tvar Button = videojs__default['default'].getComponent('Button'); // Default options for the plugin.\n\n\tvar defaults = {\n\t forwardIndex: 1,\n\t backIndex: 1\n\t}; // Cross-compatibility for Video.js 5 and 6.\n\n\tvar registerPlugin = videojs__default['default'].registerPlugin || videojs__default['default'].plugin; // const dom = videojs.dom || videojs;\n\t// document.sbInit = 0;\n\t// videojs.log('seek');\n\t// videojs.log(videojs === global.videojs);\n\t// videojs.log(videojs);\n\t// videojs.log(global.videojs);\n\t// videojs.log(document.body.querySelector('video'));\n\n\t/**\n\t * Function to invoke when the player is ready.\n\t *\n\t * This is a great place for your plugin to initialize itself. When this\n\t * function is called, the player will have its DOM and child components\n\t * in place.\n\t *\n\t * @function onPlayerReady\n\t * @param {Player} player\n\t * A Video.js player object.\n\t *\n\t * @param {Object} [options={}]\n\t * A plain object containing options for the plugin.\n\t */\n\n\tvar onPlayerReady = function onPlayerReady(player, options) {\n\t player.addClass('vjs-seek-buttons');\n\n\t if (options.forward && options.forward > 0) {\n\t player.controlBar.seekForward = player.controlBar.addChild('seekButton', {\n\t direction: 'forward',\n\t seconds: options.forward\n\t }, options.forwardIndex);\n\t }\n\n\t if (options.back && options.back > 0) {\n\t player.controlBar.seekBack = player.controlBar.addChild('seekButton', {\n\t direction: 'back',\n\t seconds: options.back\n\t }, options.backIndex);\n\t }\n\t};\n\t/**\n\t * A video.js plugin.\n\t *\n\t * In the plugin function, the value of `this` is a video.js `Player`\n\t * instance. You cannot rely on the player being in a \"ready\" state here,\n\t * depending on how the plugin is invoked. This may or may not be important\n\t * to you; if not, remove the wait for \"ready\"!\n\t *\n\t * @function seekButtons\n\t * @param {Object} [options={}]\n\t * An object of options left to the plugin author to define.\n\t */\n\n\n\tvar seekButtons = function seekButtons(options) {\n\t var _this = this;\n\n\t // document.sbInit++;\n\t this.ready(function () {\n\t onPlayerReady(_this, videojs__default['default'].mergeOptions(defaults, options));\n\t });\n\t}; // Include the version number.\n\n\n\tseekButtons.VERSION = version;\n\t/**\n\t * Button to seek forward/back\n\t *\n\t * @extends Button\n\t * @class SeekButton\n\t */\n\n\tvar SeekButton = /*#__PURE__*/function (_Button) {\n\t inheritsLoose(SeekButton, _Button);\n\n\t /**\n\t * Constructor for class\n\t *\n\t * @param {Player|Object} player The player\n\t * @param {Object=} options Button options\n\t * @param {string} options.direction back or forward\n\t * @param {Int} options.seconds number of seconds to seek\n\t */\n\t function SeekButton(player, options) {\n\t var _this2;\n\n\t _this2 = _Button.call(this, player, options) || this;\n\n\t if (_this2.options_.direction === 'forward') {\n\t _this2.controlText(_this2.localize('Seek forward {{seconds}} seconds').replace('{{seconds}}', _this2.options_.seconds));\n\t } else if (_this2.options_.direction === 'back') {\n\t _this2.controlText(_this2.localize('Seek back {{seconds}} seconds').replace('{{seconds}}', _this2.options_.seconds));\n\t }\n\n\t return _this2;\n\t }\n\t /**\n\t * Return button class names which include the seek amount.\n\t *\n\t * @return {string} css cass string\n\t */\n\n\n\t var _proto = SeekButton.prototype;\n\n\t _proto.buildCSSClass = function buildCSSClass() {\n\t /* Each button will have the classes:\n\t `vjs-seek-button`\n\t `skip-forward` or `skip-back`\n\t `skip-n` where `n` is the number of seconds\n\t So you could have a generic icon for \"skip back\" and a more\n\t specific one for \"skip back 30 seconds\"\n\t */\n\t return \"vjs-seek-button skip-\" + this.options_.direction + \" \" + (\"skip-\" + this.options_.seconds + \" \" + _Button.prototype.buildCSSClass.call(this));\n\t }\n\t /**\n\t * Seek with the button's configured offset\n\t */\n\t ;\n\n\t _proto.handleClick = function handleClick() {\n\t var now = this.player_.currentTime();\n\n\t if (this.options_.direction === 'forward') {\n\t this.player_.currentTime(now + this.options_.seconds);\n\t } else if (this.options_.direction === 'back') {\n\t this.player_.currentTime(now - this.options_.seconds);\n\t }\n\t };\n\n\t return SeekButton;\n\t}(Button); // console.log('register component with', videojs.VERSION, videojs);\n\n\n\tvideojs__default['default'].registerComponent('SeekButton', SeekButton); // Register the plugin with video.js.\n\n\tregisterPlugin('seekButtons', seekButtons);\n\n\treturn seekButtons;\n\n})));\n"],"sourceRoot":""}