From 2abe5c9732f0b8538ab6da1629f1d4ef987ede3a Mon Sep 17 00:00:00 2001 From: auto-bot Date: Sat, 13 Jun 2026 23:57:46 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=20zlib=20polyfill=20(?= =?UTF-8?q?Z=5FSYNC=5FFLUSH=20=E7=AD=89)=20+=20=E9=87=8D=E5=86=99=20FullSc?= =?UTF-8?q?reenPlayer=EF=BC=88=E5=B0=81=E9=9D=A2/=E6=8E=A7=E5=88=B6/?= =?UTF-8?q?=E6=AD=8C=E8=AF=8D=E9=AB=98=E4=BA=AE/=E9=94=AE=E7=9B=98?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FullScreenPlayer.vue | 1134 ++++++++++++++------------- src/plugins/nodePolyfills.ts | 40 +- 2 files changed, 619 insertions(+), 555 deletions(-) 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, '/'); },