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:
When the recorder is first installed, EFP now checks the browser's compatibility with container/codecs, and uses the first one that is supported. This ensures that Chrome receives specific codecs (VP8/VP9 and opus) in the RecordRTC config, rather than just "video/webm"[^1]. Chrome and Firefox should both support VP8, and possibly VP9.
When playback is requested for a recording, EFP now plays the recording back as a blob instead of using a data URI.
The file type for S3 uploads is now correctly set to webm.
[^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.
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:
webm
.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.