Videos recorded with RecordRTC cannot always be played across browsers. This is causing problems for (1) participants who need to play their own recording back before they can continue with the experiment (see #363), and (2) researchers who can only view the consent videos in the browser (vs the other trial/session recordings that are made available after consent is approved, which can be downloaded and opened in various other programs). Specifically, consent videos recorded in Chrome were showing a 'mime type not supported' error on the Consent Manager page.
Solution
This seems to be caused by specifying "video/webm" as the recording type in RecordRTC, without specifying the codecs. In Firefox (and probably other browsers?), the browser uses default codecs that are compatible with the webm container type. But in Chrome, specifying "video/webm" actually produces a Matroska file ("video/x-matroska;codecs=avc1"), which then cannot be played in the HTML5 video element. The solution to this is to specify the video/audio codecs. To do this, we also have to check the browser's container/codec support, and pass that into the recording config.
Bug description
Videos recorded with RecordRTC cannot always be played across browsers. This is causing problems for (1) participants who need to play their own recording back before they can continue with the experiment (see #363), and (2) researchers who can only view the consent videos in the browser (vs the other trial/session recordings that are made available after consent is approved, which can be downloaded and opened in various other programs). Specifically, consent videos recorded in Chrome were showing a 'mime type not supported' error on the Consent Manager page.
Solution
This seems to be caused by specifying "video/webm" as the recording type in RecordRTC, without specifying the codecs. In Firefox (and probably other browsers?), the browser uses default codecs that are compatible with the webm container type. But in Chrome, specifying "video/webm" actually produces a Matroska file ("video/x-matroska;codecs=avc1"), which then cannot be played in the HTML5 video element. The solution to this is to specify the video/audio codecs. To do this, we also have to check the browser's container/codec support, and pass that into the recording config.