Skip to content

Commit

Permalink
Fix audio issues
Browse files Browse the repository at this point in the history
  • Loading branch information
merapi committed Sep 19, 2022
1 parent 99f6ab2 commit 18daa0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/story-editor/src/components/mediaRecording/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ const AudioAnalyser = ({ source }) => {
}

useEffect(() => {
if (source.getAudioTracks().length === 0) {
return () => {};
}

const audioNode = audioContextRef.current.createMediaStreamSource(source);
audioNode.connect(analyserRef.current);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function MediaRecordingProvider({ children }) {
});

const currentRecorder =
videoEffect && videoEffect !== 'none'
videoEffect && videoEffect !== 'none' && hasVideo
? {
...mediaRecorder,
inputStatus: mediaRecorder.status,
Expand Down

0 comments on commit 18daa0d

Please sign in to comment.