Comments (11)
这问题就复杂了。。。
可以先把所有录音相关的代码和库全部移除试试长按后能不能收到touchend
如果能收到touchend,在加上JsBridge任意数据收发再测一遍,如果有JsBridge的话
如果能收到touchend,把录音功能一点点的加上,先加open测一遍,一直测到stop看看是哪个地方加上后有问题,然后好针对性的解决
from recorder.
如果用的JsBridge,并且是重写的prompt,可能是会有问题,有时间我测试一下prompt
from recorder.
Android App demo里面的长按录音不会触发touchend。
(测试方法错误)纯粹的H5录音就没有这个问题,IOS App的JsBridge也没有这个问题,有时间再研究研究这个bug
经过反复研究发现,是WebView中请求录音权限时,demo app每次都会调用Activity.requestPermissions
方法来获得权限,而requestPermissions
会造成WebView打断touch事件,进而产生H5、AppNative原生录都会产生此问题;最后把demo app内精简掉的checkSelfPermission
加上检测一下是否已授权,就没有此问题了。
此bug在新的Android Demo App里面已修复。
from recorder.
我发现这边还是有问题啊,有时可以松开手结束,有时不行,我发现程序在不断的进行window.AppJsBridgeRequest这个方法的执行
from recorder.
核心的action没有打印出来。应该是recordAlive调用,native-config中录音开始后会开启一个5秒的定时器,定时发送recordAlive心跳,Native层超过时间没有收到心跳就会自动关闭录音。这就导致了AppJsBridgeRequest在不停的被调用。
你试试我的那个Android demo app是不是也会有时松开手不能停止录音,我这反复测不出来这个情况现在。
注意:H5里面touch事件除了要监听touchend,还要监听touchcancel,这两个都算手松开了
from recorder.
from recorder.
我刚试了,给其中的录制按钮加上touchstart,touchend时间,按就了就会出现那个长按复制的字,然后松开手录音没有结束,以及我这边的项目的touchcancal执行的时间好像不太对,感觉是刚开始就执行了touchcancel,松开手还是没有监听到touchend的打印
from recorder.
看你截图那是一调用请求权限就立马执行了touchcancel,Android里面打个断点看看是不是走了Activity.requestPermissions方法,只要走了这个方法就会导致touchcancel。 我后面是把checkSelfPermission加了回去,只要有权限了就不走Activity.requestPermissions,就没有touchcancel了。
另外长按出现复制这个可以参考我的代码,注意首尾这两行:
Recorder/assets/zdemo.index.webrtc.js
Lines 183 to 203 in 609e72b
from recorder.
狂点录音按钮, 录音报错, 会触发destroy函数, 但是其他线程引用了main.Log 打日志, 但是main已经是 null
from recorder.
我研究研究,估计ios也会有这个问题😂
from recorder.
Android里面 构造函数 和 destroy 加了一个synchronized就没有多大问题了,其他线程同步一下就没有这个狂点导致崩溃的了
from recorder.
Related Issues (20)
- 你这个能实现和ChatGpt官方APP实时对话的效果吗 HOT 1
- recwave-Histogram3可视化问题 HOT 3
- 在chrome extension的content js环境中引入1.3.23120800版本的recorder-core不能正常工作,1.2.23070100可以正常工作。 HOT 2
- 以base64编码的PCM音频流转成wav播放后都是噪音 HOT 9
- 如何获取到类似 const stream = await navigator.mediaDevices.getUserMedia({ audio: true });的媒体流 HOT 2
- 大佬请教一个问题 HOT 1
- 覆盖导入Recorder HOT 1
- 继续录音的时候onProces不会触发
- Failed to construct 'AudioContext'
- 调用Recorder.GetContext(true)得到的不是running状态的AudioContext, 而是suspended HOT 1
- Cannot read properties of undefined (reading 'i18n') HOT 2
- getUserMedia的audio值能设置成扬声器吗? HOT 3
- 默认播放一个背景音乐,当打开麦克风后背景音乐会转为听筒或者声音变得特别大在IOS中
- 请问每次录音第一次都不成功,第二次才成功录上怎么解决 HOT 2
- Open方法回调需要经过200ms多延时? HOT 3
- 发现同时多次调用open
- 如何自定义apiRequest HOT 1
- ios每次都要重新授权 有遇到吗 HOT 2
- Cannot read properties of undefined (reading 'input') HOT 1
- 录音失败:未加载audio/wav编码器 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recorder.