2

I have an array of bitmaps that I want to convert to a MediaStream object so that I can render it in an HTMLVideoElement, is this possible?

Example:

// Assume I get a list of bitmaps from some source
let bitmaps = getBitmaps();

let stream = new MediaStream();
for (let bitmap of bitmaps) {
  // Somehow add the bitmap to the MediaStream
  pipe(stream, bitmap);
}

I assume this could be done with the MediaSource API, but not exactly sure on where to start.

Jacob Greenway
  • 461
  • 2
  • 8
  • 15
  • Basically this:https://stackoverflow.com/questions/38924613/how-to-convert-array-of-png-image-data-into-video-file/38929517#38929517 without the MediaRecorder part – Kaiido Jun 29 '19 at 23:00

0 Answers0