Playing webm chunks as standalone video

前端 未结 2 999
小鲜肉
小鲜肉 2020-12-18 07:30

I\'ve built some code that will get the MediaRecorder API to capture audio and video, and then use the ondataavailable function to send the corresponding webm file blobs up

相关标签:
2条回答
  • 2020-12-18 08:10

    Only the first blob received from the MediaRecorder API contains a header. So you will need to simply extract it and prepend it to your other blobs to be able to play them as standalone WebM videos. I recommend you to verify whether it works by using tools like hex editor. And you can automate this process on your server.

    0 讨论(0)
  • 2020-12-18 08:25

    With MSE, you can load the first chunk containing the WebM segment with track info and what not, and then start loading a cluster later on. The browser will figure it out.

    WebM clusters begin with timestamps, which enable this to work.

    0 讨论(0)
提交回复
热议问题