We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<script> import Recorder from '../../libs/recorder/recorder.mp3.min.js' export default { data() { return { rec: null, recBlob: null } }, onLoad() { this.recOpen() }, methods: { recOpen() { // 打开录音权限 console.log("查看引入的包") console.log(Recorder) // 获取麦克风权限 var that = this that.rec = null this.recBlob = null var newRec = Recorder({ type: "mp3", sampleRate: 16000, bitRate: 16, onProcess: function(buffers,powerLevel,bufferDuration,bufferSampleRate,newBufferIdx,asyncEnd){ console.log("什么时候打开这个回调?在这儿可以绘制图像") } }) newRec.open(function(){ that.rec = newRec console.log("已经打开录音,可以点击录制开始录音了") }),function(msg,isUserNotAllow){ // 拒绝授权 console.log("拒绝打开录音权限") } }, recStart() { if(this.rec&&Recorder.IsOpen()){ this.recBlob = null this.rec.start(); console.log("已经开始录音") }else{ console.log("未打开录音") } }, recStop() { if(!(this.rec&&Recorder.IsOpen())){ console.log("未打开录音",1); return; }; // console.log(this.rec.stop) this.rec.stop( function(blob,duration){ console.log("查看blob") this.rec.close() console.log(blob,(window.URL||webkitURL).createObjectURL(blob),"时长:"+duration+"ms"); // this.recBlob=blob; console.log("已录制mp3:"+duration+"ms "+blob.size+"字节,可以点击播放、上传了"); },function(msg){ console.log("录音失败:"+msg); }); } } } </script>
The text was updated successfully, but these errors were encountered:
报错信息
Uncaught ReferenceError: _parseInt2 is not defined
Sorry, something went wrong.
整个源码里面都没有发现_parseInt2这个字符串,我拿/assets/demo-vue里面的代码测试了一下recorder.mp3.min.js也没有出现这个问题,是不是你的开发环境帮你加料了?😂
_parseInt2
/assets/demo-vue
recorder.mp3.min.js
No branches or pull requests
The text was updated successfully, but these errors were encountered: