user recorder's mimeType for building blob

This commit is contained in:
Josh de Leeuw 2022-07-12 09:56:38 -04:00
parent 52a921a51e
commit 71b3706753
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ class RecordVideoExtension implements JsPsychExtension {
private updateData() {
this.currentTrialData.record_video_data = new Blob(this.recordedChunks, {
type: 'video/webm;codecs="vp8"',
type: this.recorder.mimeType,
});
if (this.onUpdateCallback) {
this.onUpdateCallback();

View File

@ -119,7 +119,7 @@ class HtmlVideoResponsePlugin implements JsPsychPlugin<Info> {
};
this.stop_event_handler = () => {
const data = new Blob(this.recorded_data_chunks, { type: 'video/webm;codecs="vp8"' });
const data = new Blob(this.recorded_data_chunks, { type: this.recorder.mimeType });
this.video_url = URL.createObjectURL(data);
const reader = new FileReader();
reader.addEventListener("load", () => {