I want all new APIs to be supported in Web Workers (within reason) #100
aarongustafson
started this conversation in
Wants
Replies: 2 comments 6 replies
-
+1, for sure! The one that bites me the most often is an OfflineAudioContext. If I want to do audio analysis on a file, it would be great to be able to decode the file in the worker. Currently, I have to decode it on the main thread, then pass the whole buffer over to the worker, which kills most of the benefit. |
Beta Was this translation helpful? Give feedback.
6 replies
-
@bradisbell See |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For performance reasons, it's good to have as much code running in Web Workers instead of the main thread. There are APIs like OffscreenCanvas that make it possible to do things like advanced WebGL rendering off the main thread. However many APIs are still missing in Workers, such as input events, Web Audio, video, media streams, WebRTC and so on. Each missing API is another hurdle to moving logic to a Web Worker.
More worryingly, new APIs are still being added that are not available in Web Workers. This means there are more hurdles still being added all the time, so the problem is largely getting worse, not better. Some examples of this are: async clipboard; Web Share; Web Bluetooth; Media Session; Native File System; getDisplayMedia; visual viewport; and so on. These are all added on top of the existing notable omissions (e.g. media streams, Web Audio etc).
To try to make sure the problem improves instead of gets worse, I'd like to see a commitment to support all new APIs in Web Workers wherever possible.
https://webwewant.fyi/wants/76/
Beta Was this translation helpful? Give feedback.
All reactions