Re: [css-houdini-drafts] [css-animationworklet] Sending data to animators in worklet from main thread (#869)

I have a case where i have a `<video>` element but sometimes it dose not contain any video tracks (only audio tracks).
in those cases i would like to show a visualizer. I do not wish to replace the src using with something new like `video.srcObject = canvas.captureStream()` i already have a media playing. 

I would have wished for something like `video.videoTracks.addTrack` to exist but that is not the case, it's only possible to do so with text tracks 😞 

So my 2nd effort will be to show a canvas behind the video element but that is not as much appealing as just adding a background to the video element instead. Therefore i need to 1) create a audio context `context.createMediaElementSource(video)` 2) analyze the audio and paint a visualizer to a canvas context.
it would feel unnecessary to have to send a postMessage for every frame, if something could be transferable that would be more awesome.

Maybe someone have some tricks and tips for me of how i can solve this today?

-- 
GitHub Notification of comment by jimmywarting
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/869#issuecomment-782913377 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 21 February 2021 19:40:05 UTC