Skip to content

Commit

Permalink
chore: don't destroy stream on unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlaz committed Oct 27, 2023
1 parent c68e605 commit 90f55e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const AudioVolumeIndicator = () => {
const disposeSoundDetector = createSoundDetector(
mediaStream,
({ audioLevel: al }) => setAudioLevel(al),
{ detectionFrequencyInMs: 80 },
{ detectionFrequencyInMs: 80, destroyStreamOnStop: false },
);

return () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const AudioVolumeIndicator = () => {
const disposeSoundDetector = createSoundDetector(
mediaStream,
({ audioLevel: al }) => setAudioLevel(al),
{ detectionFrequencyInMs: 80 },
{ detectionFrequencyInMs: 80, destroyStreamOnStop: false },
);

return () => {
Expand Down

0 comments on commit 90f55e7

Please sign in to comment.