-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
What is the issue with the HTML Standard?
mediaStreamTrack.stats.deliveredFrames says "Upon getting, run the expose video frame counters steps", which begin with: "Let taskId be a number unique to the current task." — Could task have an identifier instead?
For background, to avoid excessive task posting, we can get the data cross-thread and then cache it and clear it in the next task execution cycle (using Atomics, lockless ring buffer, mutex, etc.)
The simplest way to detect "same task" seemed to be to rely on a task identifier. But there currently isn't one (even though I believe some implementations might have one?)
While this might look like an optimization, we found actually specifying it this way had the least side-effects of the alternatives considered in w3c/mediacapture-extensions#108 (comment).