hls.js
hls.js copied to clipboard
Feature/forward worker logs to main thread logs
This PR will...
forward logs from the transmuxer-worker.ts to the main thread via the transmuxer-interface.ts. Logs are forwarded via a postMessage
and the transmuxer-interface then sends them to the main thread logger
Why is this Pull Request needed?
Currently, logs from the worker thread do not flow through custom debug
configuration loggers. If a user has a custom logger that captures logs and stores them, worker logs are not caught and will also leak to the browser console.
Are there any points in the code the reviewer needs to double check?
Not that I'm aware of
Resolves issues:
Closes https://github.com/video-dev/hls.js/issues/2701
Checklist
- [x] changes have been done against master branch, and PR does not conflict
- [x] new unit / functional tests have been added (whenever applicable)
- [ ] API or design changes are documented in API.md
@robwalch I updated this branch via rebase a couple of days ago, which I think was a mistake (vs merge), as it appears that hlsjs-ci dismissed the review since the approval was prior to a rebase..
@lpommers No worries. Diff looks good. ✅