Skip to content

Commit 75f28c9

Browse files
committed
fix(pencil): Safari audio element bug fix
1 parent 5be600e commit 75f28c9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-voice-recorder-player",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "Voice Recorder Component for React",
55
"repository": {
66
"type": "git",
@@ -45,7 +45,8 @@
4545
"lint": "eslint . --ext .ts,.tsx",
4646
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";",
4747
"prepare": "husky install",
48-
"semantic-release": "semantic-release --branches main"
48+
"semantic-release": "semantic-release --branches main",
49+
"host": "vite --host"
4950
},
5051
"dependencies": {
5152
"prop-types": "^15.8.1",

src/components/waveform/playback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function Playback() {
8181
const audioELem = document.querySelector('#playback_audio') as HTMLAudioElement;
8282
/* play from start */
8383
if (audioELem.readyState !== 4) {
84-
const audioURL = window.URL.createObjectURL(new Blob([blob as BlobPart]));
84+
const audioURL = window.URL.createObjectURL(new Blob([blob as BlobPart], {type: 'audio/mpeg'}));
8585
audioELem.src = audioURL;
8686
audioELem.onloadeddata = () => {
8787
audioELem.play();

0 commit comments

Comments
 (0)