I believe that wave / PCM is supported as an audio format by all browsers that support multimedia elements, so pcm should be relatively trivial to create a data file.
Video is more complicated - there is no standard codec for video, and perhaps more importantly, I doubt that any js engine is fast enough, but it’s fast enough to generate encoded video (given that native implementations only relatively recently received> performance in real time)
source share