fix for wrong audio mimetype preventing playback in Safari

This commit is contained in:
ben 2023-03-24 11:43:55 +01:00
parent 5af76ab4d7
commit cc1ca257f5

View File

@ -133,7 +133,7 @@ class HtmlAudioResponsePlugin implements JsPsychPlugin<Info> {
};
this.stop_event_handler = () => {
const data = new Blob(this.recorded_data_chunks, { type: "audio/webm" });
const data = new Blob(this.recorded_data_chunks, { type: this.recorded_data_chunks[0].type });
this.audio_url = URL.createObjectURL(data);
const reader = new FileReader();
reader.addEventListener("load", () => {