xqq / mpegts.js

HTML5 MPEG2-TS / FLV Stream Player
Apache License 2.0
1.82k stars 224 forks source link

[Bug] use Mpegts.js with "enableWorker: true",some error uncaught in worker. #149

Open BanShan-Alec opened 1 year ago

BanShan-Alec commented 1 year ago

环境: "mpegts.js": "^1.7.3", “Chrome/116.0.5845.228” "webpack": "^5.81.0"

问题描述: 如果 mpegts.js 开启enableWorker,webpack开启默认的压缩混淆;则会出现bug(关闭minimize则没问题)

optimization: {
    minimize: true,
    minimizer: ['...', new CssMinimizerPlugin()],
},

Snipaste_2023-11-22_14-14-26 Snipaste_2023-11-22_14-15-34

压缩混淆后的worker代码 a0a2e36f-6843-455a-9a33-3ba0b57daa92.json

xqq commented 12 months ago

@BanShan-Alec

I have tested the official build (which means build by hitting npm run build inside mpegts.js directory) and it works well under the minimized release build with enableWorker: true.