DEV Community

Discussion on: An introduction to the MediaRecorder API

Collapse
 
jamonjamon profile image
Jaimie Carter

This looks great. Very interested in media. The AV1 codec looks great and it will be good when there are some hardware encoders, with acceptable latency.

Collapse
 
philnash profile image
Phil Nash

That is interesting. It looks like the browsers that support MediaRecorder mostly also support playing video encoded with AV1

const video = document.createElement('video');
video.canPlayType('video/webm; codecs="av1"');
// => "probably"

But they don't yet record with it.

MediaRecorder.isTypeSupported('video/webm; codecs="av1"')
// => false

Will be interesting to see where this goes!

Collapse
 
jamonjamon profile image
Jaimie Carter

Indeed. Maybe the reason recording is unsupported (and I have no idea what I'm talking about, here) is due to the browsers not being about to cope with the level of processing the codec requires. ? An open source solution like this is certainly overdue in this space. Let's hope everyone (apple) supports it properly.

Thread Thread
 
philnash profile image
Phil Nash

I would reckon so! Leaving browsers to hang for a long time would not be a good experience and they already suck up plenty of memory. It already takes a while when you record a video to encode it and produce it ready to play back. As you said, as hardware encoding becomes available it might become better and browsers might well be able to hand off to that hardware to process.

That's why the MediaRecorder.isTypeSupported method exists. So we can choose the best possible for our users and then fallback.