colors not detected in AudioWorkletProcessor

Open
#742 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
tooling

Research direction

Start with the browser implementation at src/browser.js, especially useColors(), and compare its behavior with the AudioWorkletProcessor scenario described in the issue. Determine how a public opt-in color override should work for a debug instance; the work is done when browser users can force colors without assigning the internal property directly.

Written by the indexing model from the issue text.

Description

https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletProcessor

The AudioWorkletProcessor interface of the Web Audio API represents an audio processing code behind a custom AudioWorkletNode. It lives in the AudioWorkletGlobalScope and runs on the Web Audio rendering thread. In turn, an AudioWorkletNode based on it runs on the main thread.

The application creates a file containing the definition of a class inheriting from AudioWorkletProcessor and writes JS on it. It can use debug module or console directly and, auto-magically, Chrome redirects its output to DevTools console.

However there are no colors because this useColors() function returns false. Setting debugInstance.useColors = true manually (which is ugly and non public API) does work.

In Node there is a DEBUG_COLORS env to force colors. In browser there is no way to manually force colors in corner (but IMHO legit) cases like the above one. May I suggest a debugInstance.forceColors() method or something like that?

Dominant language
JavaScript
Stars
11.5k
Forks
992
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from debug-js/debug

All issues in debug-js/debug

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.