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

是不是不支持x5内核的手机浏览器 #14

Closed
veeki opened this issue Feb 27, 2019 · 10 comments
Closed

是不是不支持x5内核的手机浏览器 #14

veeki opened this issue Feb 27, 2019 · 10 comments

Comments

@veeki
Copy link

veeki commented Feb 27, 2019

我在手机上google浏览器和360都可以调用录音 封装成app就不行的 在线打包的app是 X5内核的

@xiangyuecn
Copy link
Owner

是提示录音权限吗?如果是,请参考参考 #8 onPermissionRequest里给授权

@veeki
Copy link
Author

veeki commented Feb 27, 2019

不是权限 就是在录音完毕后 点击播放没有声音 在web 浏览器上可以 app中不行 收集不到录音的内容

@veeki
Copy link
Author

veeki commented Feb 27, 2019

就是在 app中点击录制的时候 那个波浪线没有(手机浏览器录制的时候有) 我用的 一门app封装的 你可以调试

@veeki
Copy link
Author

veeki commented Feb 27, 2019

点击停止 就提示 失败:未开始录音 手机浏览器不存在这个问题

@xiangyuecn
Copy link
Owner

那就奇怪了,如果是能正常开始录音,但没采集到音频数据,应该是提示“未采集到录音”

但你这个提示“未开始录音”,那应该有可能产生的情况:

  1. open打开录音失败,会走fail回调
    False(notAllow?"用户拒绝了录音权限":"无法录音:"+code,notAllow);
  2. start调用抛出现异常,导致start代码没有运行到结尾进行变更状态
    This.state=1;

你可以先对这两个情况测试一下:

  1. open时有没有走fail回调?

  2. 用try catch包裹一下rec.start()调用代码,看看会不会抛异常,如果出现异常,把异常记录和我反馈一下

有时间我会在app上测试一下,你那先看看能不能解决,有什么结果了在这里继续反馈一下哈

@xiangyuecn
Copy link
Owner

刚刚拿以前开发的app试了一下,使用的是系统自带的webview,并未申请系统录音权限,也并未处理浏览器权限接口。刚才测试的结果是open时提示“用户拒绝了录音权限”

App内运行的测试代码,仅供参考:

var jsn=0;
function run(){
	jsn++;
	if(jsn!=3){
		return;
	}
	rec=Recorder()
	rec.open(function(){
		try{
			rec.start()
		}catch(e){
			AppRequest.tips(e.stack);
			return;
		}
		setTimeout(function(){
			rec.stop(function(blob,duration){
				AppRequest.tips("已录制"+duration);
			},function(s){
				AppRequest.tips("停止失败:"+s);
			});
		},3000);
	},function(s){
		AppRequest.tips(s) //←←←这里抛的提示信息
	})
}

LoadJs("https://xiangyuecn.github.io/Recorder/src/recorder-core.js",run)
LoadJs("https://xiangyuecn.github.io/Recorder/src/engine/mp3.js",run)
LoadJs("https://xiangyuecn.github.io/Recorder/src/engine/mp3-engine.js",run)

@veeki
Copy link
Author

veeki commented Feb 28, 2019

很奇怪的问题: 1 我在recorder-core.js 任何方法打印任何东西都没有响应,包括 open start 而浏览器有响应 即使在文件最顶部 alert 感觉是没有加载到文件
2 点击结束的时候 提示 失败:未开始录音 但是这个提示不是来自recorder-core.js 的stop 因为我把这个stop 里面的 提示修改为 False("未开始录音4646545646546"); 还是提示 未开始录音

浏览器上不存在任何问题 就是app不行 用的一门app打包的 地址采用了 https

@xiangyuecn
Copy link
Owner

打印任何东西没响应,应该是缓存问题,改了js可能清理一下缓存才会生效(一门里面我的测试app有个浮动的按钮,里面有清除缓存,蛮好用)

我刚才特意注册了一下 一门,封装了我这个库的demo页面地址。已复现这个问题。

表现很奇怪,给了app摄像头和录音权限,能弹出微信那个“想要使用您的麦克风“对话框。
但开始录制后,并没有真正开始录音,rec.state==0,导致停止录音时直接提示“未开始录音”。

重启app多试几次发现,后面再也无法调起“想要使用您的麦克风”对话框,直接返回NotReadableError,这个是重点,要考的

我在简易控制台中对state追踪发现,start压根就不会执行_start方法,在判断是否打开了底层录音功能时就退出去了:

if(!Recorder.IsOpen()){
return;

原因在于readyState=="ended":

Recorder.IsOpen=function(){
var stream=Recorder.Stream;
if(stream){
var tracks=stream.getTracks();
if(tracks.length>0){
return tracks[0].readyState=="live";

我把return tracks[0].readyState=="live";强制改成return true;,强制录音,浏览器能够正常回调录音数据,但音频内容全部是000000,意思就是在假录音,无法获取到麦克风的录音。

综合上面的这些数据,正常浏览器的readyState=="live",但这里却是ended。还有出现了NotReadableError后不重装app,就再也无法调起录音权限,这也是一个问题。

初步结论:这个问题跟浏览器实现有关系,算是浏览器Bug,无法通过js代码来解决。


附数据:

data:audio/mp3;base64,//MoxAAAAANIAAAAAExBTUUDAAkIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//MoxAAAAANIAAAAAExBTUUDAAkIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//MoxAAAAANIAAAAAExBTUUDAAkIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//MoxAAAAANIAAAAAExBTUUDAAkIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//MoxAAAAANIAAAAAExBTUUDAAkIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//MoxAAAAANIAAAAAExBTUUDAAkIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//MoxAAAAANIAAAAAExBTUUDAAkIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//MoxAAAAANIAAAAAExBTUUDAAkIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//MoxAAAAANIAAAAAExBTUUDAAkIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//MoxAAAAANIAAAAAExBTUUDAAkIAAQAAAAAAAAAAAAA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天了,哈哈。参考阅读https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack

另外测试了一下用系统的webview,一门应该是没有做权限处理,和我那老app一样,webview采用的默认的拒绝用户授权。

暂时无解

@xiangyuecn
Copy link
Owner

折腾了一晚上,封装了腾讯X5内核的App是支持录音的,前提AppAndroidManifest.xml中配置好两个关键权限

<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>

一门的app没有设置MODIFY_AUDIO_SETTINGS权限,导致不能录音。

我在.assets/android_test/app-debug-xxx.apk中放了测试app,移除MODIFY_AUDIO_SETTINGS权限后,和一门的表现一基本一样,返回NotReadableError错误,加上权限就能正常录音。

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