wvp-gb28181-project/web_src/static/js/jessibuca/index.js

8 lines
530 KiB
JavaScript
Raw Normal View History

2021-07-27 16:05:12 +08:00
!function(){function t(t,e,r,n){Object.defineProperty(t,e,{get:r,set:n,enumerable:!0,configurable:!0})}function e(t){return t&&t.__esModule?t.default:t}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n={},i={},o=r.parcelRequire2e50;null==o&&((o=function(t){if(t in n)return n[t].exports;if(t in i){let e=i[t];delete i[t];let r={id:t,exports:{}};return n[t]=r,e.call(r.exports,r,r.exports),r.exports}var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}).register=function(t,e){i[t]=e},r.parcelRequire2e50=o),o.register("617MK",(function(e,r){var n;n=e.exports,Object.defineProperty(n,"__esModule",{value:!0,configurable:!0}),t(e.exports,"default",(()=>l));var i=o("3SdKF"),a=o("6fjPb"),s=o("2zYtZ"),f=o("1D6XL"),h=o("1i6TV"),u=o("2AXxm"),c=o("2Zrui");class d{set fullscreen(t){t?(c.checkFull()||this.$container.requestFullscreen(),c.$domToggle(this.$doms.minScreenDom,!0),c.$domToggle(this.$doms.fullscreenDom,!1)):(c.checkFull()&&document.exitFullscreen(),c.$domToggle(this.$doms.minScreenDom,!1),c.$domToggle(this.$doms.fullscreenDom,!0)),this._fullscreen!==t&&(this.onFullscreen(t),this._trigger(u.EVEMTS.fullscreen,t)),this._fullscreen=t}get fullscreen(){return this._fullscreen}set playing(t){t?(c.$domToggle(this.$doms.playBigDom,!1),c.$domToggle(this.$doms.playDom,!1),c.$domToggle(this.$doms.pauseDom,!0),c.$domToggle(this.$doms.screenshotsDom,!0),c.$domToggle(this.$doms.recordDom,!0),this._quieting?(c.$domToggle(this.$doms.quietAudioDom,!0),c.$domToggle(this.$doms.playAudioDom,!1)):(c.$domToggle(this.$doms.quietAudioDom,!1),c.$domToggle(this.$doms.playAudioDom,!0))):(this.$doms.speedDom&&(this.$doms.speedDom.innerText=""),this._playUrl&&(c.$domToggle(this.$doms.playDom,!0),c.$domToggle(this.$doms.playBigDom,!0),c.$domToggle(this.$doms.pauseDom,!1)),c.$domToggle(this.$doms.recordDom,!1),c.$domToggle(this.$doms.recordingDom,!1),c.$domToggle(this.$doms.screenshotsDom,!1),c.$domToggle(this.$doms.quietAudioDom,!1),c.$domToggle(this.$doms.playAudioDom,!1)),this._playing!==t&&(t?(this.onPlay(),this._trigger(u.EVEMTS.play)):(this.onPause(),this._trigger(u.EVEMTS.pause))),this._playing=t}get playing(){return this._playing}set quieting(t){t?(c.$domToggle(this.$doms.quietAudioDom,!0),c.$domToggle(this.$doms.playAudioDom,!1)):(c.$domToggle(this.$doms.quietAudioDom,!1),c.$domToggle(this.$doms.playAudioDom,!0)),this._quieting!==t&&(this.onMute(t),this._trigger(u.EVEMTS.mute,t)),this._quieting=t}get quieting(){return this._quieting}set loading(t){t?(c.$hideBtns(this.$doms),c.$domToggle(this.$doms.fullscreenDom,!0),c.$domToggle(this.$doms.pauseDom,!0),c.$domToggle(this.$doms.loadingDom,!0)):c.$initBtns(this.$doms),this._loading=t}get loading(){return this._loading}set recording(t){t?(c.$domToggle(this.$doms.recordDom,!1),c.$domToggle(this.$doms.recordingDom,!0)):(c.$domToggle(this.$doms.recordDom,!0),c.$domToggle(this.$doms.recordingDom,!1)),this._recording!==t&&(this.onRecord(t),this._trigger(u.EVEMTS.record,t),this._recording=t)}get recording(){return this._recording}setDebug(t){this._opt.isDebug=!!t}setTimeout(t){this._opt.timeout=Number(t)}setVod(t){this._opt.vod=!!t}setNoOffscreen(t){this._opt.forceNoOffscreen=!!t}setScaleMode(t){0===(t=Number(t))?(this._opt.isFullResize=!1,this._opt.isResize=!1):1===t?(this._opt.isFullResize=!1,this._opt.isResize=!0):2===t&&(this._opt.isFullResize=!0),this._resize()}mute(){this._mute()}cancelMute(){this._cancelMute()}audioResume(){this._cancelMute()}pause(){this._pause()}play(t){this._play(t)}close(){this._close()}destroy(){this._close(),this._destroyAudioContext(),this._destroyContextGL(),this._decoderWorker.terminate(),this._removeEventListener(),this._initCheckVariable(),this._off(),this._removeContainerChild()}clearView(){this._clearView()}resize(){this._resize()}setBufferTime(t){t=Number(t),this._decoderWorker.postMessage({cmd:u.POST_MESSAGE.setVideoBuffer,time:t})}setRotate(t){t=parseInt(t,10);this._opt.rotate!==t&&-1!==[0,90,270].indexOf(t)&&(this._opt.rotate=t,this.resize())}
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var n,i,a,s;t(e.exports,"Buffer",(()=>n),(t=>n=t)),t(e.exports,"SlowBuffer",(()=>s),(t=>s=t)),t(e.exports,"kMaxLength",(()=>i),(t=>i=t)),t(e.exports,"INSPECT_MAX_BYTES",(()=>a),(t=>a=t));var f=o("1VDzd"),h=o("7xT9b"),u="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;n=l,s=function(t){+t!=t&&(t=0);return l.alloc(+t)},a=50;var c=2147483647;function d(t){if(t>c)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return b(t)}return p(t,e,r)}function p(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|w(t,e),n=d(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){var e=new Uint8Array(t);return v(e.buffer,e.byteOffset,e.byteLength)}return g(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return v(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return v(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,r);var i=function(t){if(l.isBuffer(t)){var e=0|y(t.length),r=d(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||G(t.length)?d(0):g(t);if("Buffer"===t.type&&Array.isArray(t.data))return g(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function m(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function b(t){return m(t),d(t<0?0:0|y(t))}function g(t){for(var e=t.length<0?0:0|y(t.length),r=d(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function v(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,l.prototype),n}function y(t){if(t>=c)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c.toString(16)+" bytes");return 0|t}function w(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(i)return n?-1:Y(t).length;e=(""+e).toLowerCase(),i=!0}}function _(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(n)throw new TypeErr
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var n,i;t(e.exports,"write",(()=>n),(t=>n=t)),t(e.exports,"read",(()=>i),(t=>i=t)),i=function(t,e,r,n,i){var o,a,s=8*i-n-1,f=(1<<s)-1,h=f>>1,u=-7,c=r?i-1:0,d=r?-1:1,l=t[e+c];for(c+=d,o=l&(1<<-u)-1,l>>=-u,u+=s;u>0;o=256*o+t[e+c],c+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+t[e+c],c+=d,u-=8);if(0===o)o=1-h;else{if(o===f)return a?NaN:1/0*(l?-1:1);a+=Math.pow(2,n),o-=h}return(l?-1:1)*a*Math.pow(2,o-n)},n=function(t,e,r,n,i,o){var a,s,f,h=8*o-i-1,u=(1<<h)-1,c=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-a))<1&&(a--,f*=2),(e+=a+c>=1?d/f:d*Math.pow(2,1-c))*f>=2&&(a++,f/=2),a+c>=u?(s=0,a=u):a+c>=1?(s=(e*f-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[r+l]=255&s,l+=p,s/=256,i-=8);for(a=a<<i|s,h+=i;h>0;t[r+l]=255&a,l+=p,a/=256,h-=8);t[r+l-p]|=128*m}})),o.register("7BCkb",(function(t,e){var r=o("67ZL8");function n(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function i(t,e){for(var r,n="",i=0,o=-1,a=0,s=0;s<=t.length;++s){if(s<t.length)r=t.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var f=n.lastIndexOf("/");if(f!==n.length-1){-1===f?(n="",i=0):i=(n=n.slice(0,f)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,s):n=t.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var a={resolve:function(){for(var t,e="",o=!1,a=arguments.length-1;a>=-1&&!o;a--){var s;a>=0?s=arguments[a]:(void 0===t&&(t=r.cwd()),s=t),n(s),0!==s.length&&(e=s+"/"+e,o=47===s.charCodeAt(0))}return e=i(e,!o),o?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(n(t),0===t.length)return".";var e=47===t.charCodeAt(0),r=47===t.charCodeAt(t.length-1);return 0!==(t=i(t,!e)).length||e||(t="."),t.length>0&&r&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return n(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var r=arguments[e];n(r),r.length>0&&(void 0===t?t=r:t+="/"+r)}return void 0===t?".":a.normalize(t)},relative:function(t,e){if(n(t),n(e),t===e)return"";if((t=a.resolve(t))===(e=a.resolve(e)))return"";for(var r=1;r<t.length&&47===t.charCodeAt(r);++r);for(var i=t.length,o=i-r,s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var f=e.length-s,h=o<f?o:f,u=-1,c=0;c<=h;++c){if(c===h){if(f>h){if(47===e.charCodeAt(s+c))return e.slice(s+c+1);if(0===c)return e.slice(s+c)}else o>h&&(47===t.charCodeAt(r+c)?u=c:0===c&&(u=0));break}var d=t.charCodeAt(r+c);if(d!==e.charCodeAt(s+c))break;47===d&&(u=c)}var l="";for(c=r+u+1;c<=i;++c)c!==i&&47!==t.charCodeAt(c)||(0===l.length?l+="..":l+="/..");return l.length>0?l+e.slice(s+u):(s+=u,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(n(t),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,i=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":t.slice(0,i)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');n(t);var r,i=0,o=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,f=-1;for(r=t.length-1;r>=0;--r){var h=t.charCodeAt(r);if(47===h){if(!a){i=r+1;break}}else-1===f&&(a=!1,f=r+1),s>=0&&(h===e.charCodeAt(s)?-1==--s&&(o=r):(s=-1,o=f))}return i===o?o=f:-1===o&&(o=t.length),t.slice(i,o)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!a){i=r+1;break}}else-1===o&&(a=!1,o=r+1);return-1===o?"":t.slice(i,o)},extname:function(t){n(t);for(var e=-1,r=0,i=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var f=t.charCodeAt(s);i