mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
user recorder's mimeType
for building blob
This commit is contained in:
parent
52a921a51e
commit
71b3706753
@ -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();
|
||||
|
@ -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", () => {
|
||||
|
Loading…
Reference in New Issue
Block a user