Files
pgsql-jellyfin/publish_test2/wwwroot/syncPlay-plugin.f532382eb6cd87a2687a.chunk.js

1 line
8.0 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1680,39573,40394],{9066:function(t,e,n){n.r(e),n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(36457),n(26437),n(52697),n(78557),n(21359),n(61642),n(83994),n(82367);var r=n(10699),o=n(44797);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(t,e,n,r){var o=l(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},l.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function p(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var s,b,h,d=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=f(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}(this,e,[t,n])).isPlayerActive=!1,r.savedPlaybackRate=1,r.minBufferingThresholdMillis=3e3,t.currentTimeAsync&&(r.currentTimeAsync=function(){return r.player.currentTimeAsync()}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),n=e,r=[{key:"localBindToPlayer",value:function(){c(e,"localBindToPlayer",this,3)([]);var t=this;this._onPlaybackStart=function(e,n){t.isPlayerActive=!0,t.onPlaybackStart(e,n)},this._onPlaybackStop=function(e){t.isPlayerActive=!1,t.onPlaybackStop(e)},this._onUnpause=function(){t.onUnpause()},this._onPause=function(){t.onPause()},this._onTimeUpdate=function(e){var n=new Date,r=t.player.currentTime();t.onTimeUpdate(e,{currentTime:n,currentPosition:r})},this._onPlaying=function(){clearTimeout(t.notifyBuffering),t.onReady()},this._onWaiting=function(){clearTimeout(t.notifyBuffering),t.notifyBuffering=setTimeout((function(){t.onBuffering()}),t.minBufferingThresholdMillis)},o.A.on(this.player,"playbackstart",this._onPlaybackStart),o.A.on(this.player,"playbackstop",this._onPlaybackStop),o.A.on(this.player,"unpause",this._onUnpause),o.A.on(this.player,"pause",this._onPause),o.A.on(this.player,"timeupdate",this._onTimeUpdate),o.A.on(this.player,"playing",this._onPlaying),o.A.on(this.player,"waiting",this._onWaiting),this.savedPlaybackRate=this.player.getPlaybackRate()}},{key:"localUnbindFromPlayer",value:function(){c(e,"localUnbindFromPlayer",this,3)([]),o.A.off(this.player,"playbackstart",this._onPlaybackStart),o.A.off(this.player,"playbackstop",this._onPlaybackStop),o.A.off(this.player,"unpause",this._onUnpause),o.A.off(this.player,"pause",this._onPause),o.A.off(this.player,"timeupdate",this._onTimeUpdate),o.A.off(this.player,"playing",this._onPlaying),o.A.off(this.player,"waiting",this._onWaiting),this.player.setPlaybackRate(this.savedPlaybackRate)}},{key:"onQueueUpdate",value:function(){o.A.trigger(this.player,"playlistitemadd")}},{key:"isPlaybackActive",value:function(){return this.isPlayerActive}},{key:"isPlaying",value:function(){return!this.player.paused()}},{key:"currentTime",value:function(){return this.player.currentTime()}},{key:"hasPlaybackRate",value:function(){return!0}},{key:"setPlaybackRate",value:function(t){this.player.setPlaybackRate(t)}},{key:"getPlaybackRate",value:function(){return this.player.getPlaybackRate()}}],r&&a(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.default);s=d,h="htmlvideoplayer",(b=p(b="type"))in s?Object.defineProperty(s,b,{value:h,enumerable:!0,configurable:!0,writable:!0}):s[b]=h,e.default=d},41443:function(t,e,n){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(o=function(){return!!t})()}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n(29305),n(32733),n(84701),n(81678),n(44962),n(4754),n(94),n(36947),n(26437),n(52697),n(78557),n(21359),n(83994),n(82367);var c,l,f,y=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=i(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,o()?Reflect.construct(e,n||[],i(t).constructor):e.apply(t,n))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(n(9066).default);c=y,f="htmlaudioplayer",(l=u(l="type"))in c?Object.defineProperty(c,l,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[l]=f,e.default=y},55230:function(t,e,n){n.r(e);var r=n(39738),o=n(67430),i=n(44797),a=n(99555),u=n(10699),c=n(9066),l=n(41443),f=n(38783),y=function(){function t(){this.name="SyncPlay Plugin",this.id="syncplay",this.type=f.Q.SyncPlay,this.priority=1,this.instance=a.default,this.init()}return t.prototype.init=function(){a.default.PlayerFactory.setDefaultWrapper(u.default),a.default.PlayerFactory.registerWrapper(c.default),a.default.PlayerFactory.registerWrapper(l.default),i.A.on(r.f,"playerchange",(function(t,e){a.default.Manager.onPlayerChange(e)}));var t=o.tF.currentApiClient();t&&a.default.Manager.init(t),i.A.on(o.tF,"apiclientcreated",(function(t,e){return a.default.Manager.init(e)})),i.A.on(o.tF,"localusersignedin",(function(){return a.default.Manager.updateApiClient(o.tF.currentApiClient())})),i.A.on(o.tF,"localusersignedout",(function(){return a.default.Manager.updateApiClient(o.tF.currentApiClient())}))},t}();e.default=y}}]);