hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

Feature/forward worker logs to main thread logs

Open lpommers opened this issue 1 year ago • 2 comments

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

lpommers avatar Jul 29 '22 20:07 lpommers

@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 avatar Aug 09 '22 12:08 lpommers

@lpommers No worries. Diff looks good. ✅

robwalch avatar Aug 09 '22 15:08 robwalch