diff --git a/src/components/FullScreenPlayer.vue b/src/components/FullScreenPlayer.vue index 6e6c2c5..40301a1 100644 --- a/src/components/FullScreenPlayer.vue +++ b/src/components/FullScreenPlayer.vue @@ -1,620 +1,650 @@ - diff --git a/src/plugins/nodePolyfills.ts b/src/plugins/nodePolyfills.ts index 21fa746..9c9a6b2 100644 --- a/src/plugins/nodePolyfills.ts +++ b/src/plugins/nodePolyfills.ts @@ -400,15 +400,49 @@ export function createNodePolyfills(): Record { URLSearchParams: typeof (globalThis as any).URLSearchParams !== 'undefined' ? (globalThis as any).URLSearchParams : function() {}, }, zlib: { + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + Z_VERSION_ERROR: -6, + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_DEFAULT_STRATEGY: 0, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + DEFLATE: 1, + INFLATE: 2, + GZIP: 3, + GUNZIP: 4, + DEFLATERAW: 5, + INFLATERAW: 6, + UNZIP: 7, + BROTLI_DECODE: 8, + BROTLI_ENCODE: 9, gunzipSync: (d: any) => d, inflateSync: (d: any) => d, deflateSync: (d: any) => d, gzipSync: (d: any) => d, gunzip: (d: any, cb: (err: Error | null, out: any) => void) => { setTimeout(() => cb(null, d), 0); }, inflate: (d: any, cb: (err: Error | null, out: any) => void) => { setTimeout(() => cb(null, d), 0); }, - createGunzip: () => { const p = Object.create(streamMod.Transform.prototype); p.write = () => true; p.end = function() { this.emit && this.emit('end'); return this; }; return p; }, - createInflate: () => { const p = Object.create(streamMod.Transform.prototype); p.write = () => true; p.end = function() { this.emit && this.emit('end'); return this; }; return p; }, - createGzip: () => { const p = Object.create(streamMod.Transform.prototype); p.write = () => true; p.end = function() { this.emit && this.emit('end'); return this; }; return p; }, + createGunzip: () => { const p: any = Object.create(streamMod !== undefined ? streamMod.Transform.prototype : {}); p.write = () => true; p.end = function() { this.emit && this.emit('end'); return this; }; return p; }, + createInflate: () => { const p: any = Object.create(streamMod !== undefined ? streamMod.Transform.prototype : {}); p.write = () => true; p.end = function() { this.emit && this.emit('end'); return this; }; return p; }, + createGzip: () => { const p: any = Object.create(streamMod !== undefined ? streamMod.Transform.prototype : {}); p.write = () => true; p.end = function() { this.emit && this.emit('end'); return this; }; return p; }, }, path: { join: function() { return Array.prototype.slice.call(arguments).filter(Boolean).join('/').replace(/\/+/g, '/'); },