-
Notifications
You must be signed in to change notification settings - Fork 1k
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
开始录音之后会监听不到touchend事件 #46
Comments
这问题就复杂了。。。 可以先把所有录音相关的代码和库全部移除试试长按后能不能收到touchend 如果能收到touchend,在加上JsBridge任意数据收发再测一遍,如果有JsBridge的话 如果能收到touchend,把录音功能一点点的加上,先加open测一遍,一直测到stop看看是哪个地方加上后有问题,然后好针对性的解决 |
如果用的JsBridge,并且是重写的prompt,可能是会有问题,有时间我测试一下prompt |
Android App demo里面的长按录音不会触发touchend。 (测试方法错误) 经过反复研究发现,是WebView中请求录音权限时,demo app每次都会调用 此bug在新的Android Demo App里面已修复。 |
核心的action没有打印出来。应该是recordAlive调用,native-config中录音开始后会开启一个5秒的定时器,定时发送recordAlive心跳,Native层超过时间没有收到心跳就会自动关闭录音。这就导致了AppJsBridgeRequest在不停的被调用。 你试试我的那个Android demo app是不是也会有时松开手不能停止录音,我这反复测不出来这个情况现在。 注意:H5里面touch事件除了要监听touchend,还要监听touchcancel,这两个都算手松开了 |
我明天试试发自我的华为手机-------- 原始邮件 --------发件人: 高坚果 <notifications@github.com>日期: 2019年11月7日周四 23:19收件人: xiangyuecn/Recorder <Recorder@noreply.github.com>抄送: zhengyn0001 <1046611633@qq.com>, State change <state_change@noreply.github.com>主 题: Re: [xiangyuecn/Recorder] 开始录音之后会监听不到touchend事件 (#46)核心的action没有打印出来。应该是recordAlive调用,native-config中录音开始后会开启一个5秒的定时器,定时发送recordAlive心跳,Native层超过时间没有收到心跳就会自动关闭录音。这就导致了AppJsBridgeRequest在不停的被调用。
你试试我的那个Android demo app是不是也会有时松开手不能停止录音,我这反复测不出来这个情况现在。
注意:H5里面touch事件除了要监听touchend,还要监听touchcancel,这两个都算手松开了
—You are receiving this because you modified the open/close state.Reply to this email directly, view it on GitHub, or unsubscribe.
|
看你截图那是一调用请求权限就立马执行了touchcancel,Android里面打个断点看看是不是走了Activity.requestPermissions方法,只要走了这个方法就会导致touchcancel。 我后面是把checkSelfPermission加了回去,只要有权限了就不走Activity.requestPermissions,就没有touchcancel了。 另外长按出现复制这个可以参考我的代码,注意首尾这两行: Recorder/assets/zdemo.index.webrtc.js Lines 183 to 203 in 609e72b
|
我研究研究,估计ios也会有这个问题😂 |
Android里面 构造函数 和 destroy 加了一个synchronized就没有多大问题了,其他线程同步一下就没有这个狂点导致崩溃的了 |
我的代码的实现是按住开始录音,之后松开结束录音,可是在安卓的app里面的h5页面能监听到touchstart,不能监听到touchend
The text was updated successfully, but these errors were encountered: