Skip to content

Commit cc1ca25

Browse files
committed
fix for wrong audio mimetype preventing playback in Safari
1 parent 5af76ab commit cc1ca25

File tree

1 file changed

+1
-1
lines changed
  • packages/plugin-html-audio-response/src

1 file changed

+1
-1
lines changed

packages/plugin-html-audio-response/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class HtmlAudioResponsePlugin implements JsPsychPlugin<Info> {
133133
};
134134

135135
this.stop_event_handler = () => {
136-
const data = new Blob(this.recorded_data_chunks, { type: "audio/webm" });
136+
const data = new Blob(this.recorded_data_chunks, { type: this.recorded_data_chunks[0].type });
137137
this.audio_url = URL.createObjectURL(data);
138138
const reader = new FileReader();
139139
reader.addEventListener("load", () => {

0 commit comments

Comments
 (0)