Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何判断是否正在录音 #237

Open
liyao1520 opened this issue Aug 7, 2024 · 1 comment
Open

如何判断是否正在录音 #237

liyao1520 opened this issue Aug 7, 2024 · 1 comment

Comments

@liyao1520
Copy link

如何判断是否正在录音状态

@xiangyuecn
Copy link
Owner

自己用个变量存一下,比如isStart=false,在start之后赋值为true

但部分情况下start后并不一定是在录音的,或被系统中断了录音;要稳健一点的,可以监控onProcess回调,里面记录回调时间,当回调时间和当前时间相差不大时,可以认为是在正常录音,相差太大就没有在正常录音,start的时候可以搞个定时器定时检查这个时间

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants