Parcourir la source

fix audio not working during development due to react's useEffect wil be triggered twice (#6126)

tags/0.6.15
Lance Mao il y a 1 an
Parent
révision
75445a0c66
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4
    0
      web/app/components/base/voice-input/index.tsx

+ 4
- 0
web/app/components/base/voice-input/index.tsx Voir le fichier

@@ -152,6 +152,10 @@ const VoiceInput = ({
useEffect(() => {
initCanvas()
handleStartRecord()
const recorderRef = recorder?.current
return () => {
recorderRef?.stop()
}
}, [])

const minutes = parseInt(`${parseInt(`${originDuration}`) / 60}`)

Chargement…
Annuler
Enregistrer