lookit / ember-lookit-frameplayer

Ember app with experiment frames and a frame player to run browser-based experiments
MIT License
5 stars 20 forks source link

Check video container/codec support and set in RecordRTC config #365

Closed becky-gilbert closed 9 months ago

becky-gilbert commented 9 months ago

This PR fixes a problem with the video recordings in Chrome, where using "video/webm" as the mime type was sometimes producing recordings that could not be replayed by the participant or viewed by researchers in the web browser (e.g. on the Consent Manager page). This PR fixes these problems with the following changes:

Fixes #363 Fixes #364

More info: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs

[^1]: I've kept "video/webm" as the fallback option, in case the browser doesn't support any of the codecs in our list. I think there's enough support for VP8 and VP9 in FF and Chrome that this fallback shouldn't be needed, but if it is, then we are at least likely to get valid recordings in S3 (even if they won't play in the browser), which seems better than producing an error that prevents the family from continuing.