处理语音模块麦克风占用问题,现在在非录音状态下不会一直占用麦克风
Some checks failed
Check / lint (push) Has been cancelled
Check / typecheck (push) Has been cancelled
Check / build (build, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Has been cancelled
Some checks failed
Check / lint (push) Has been cancelled
Check / typecheck (push) Has been cancelled
Check / build (build, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Has been cancelled
This commit is contained in:
parent
82e14bb969
commit
d76ec030e6
@ -313,7 +313,7 @@ export default {
|
|||||||
let that = this
|
let that = this
|
||||||
|
|
||||||
// 请求权限
|
// 请求权限
|
||||||
that.checkPermission(true)
|
that.checkPermission()
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
recorderManager.onStop((res) => {
|
recorderManager.onStop((res) => {
|
||||||
@ -393,7 +393,7 @@ export default {
|
|||||||
that.permissionInfo = permissionInfo
|
that.permissionInfo = permissionInfo
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
continueAppMicro(isFirstRequestPer = false) {
|
continueAppMicro() {
|
||||||
let that = this
|
let that = this
|
||||||
RecordApp.UniWebViewActivate(that) //App环境下必须先切换成当前页面WebView
|
RecordApp.UniWebViewActivate(that) //App环境下必须先切换成当前页面WebView
|
||||||
RecordApp.RequestPermission(
|
RecordApp.RequestPermission(
|
||||||
@ -401,9 +401,7 @@ export default {
|
|||||||
console.log('已获得录音权限,可以开始录音了')
|
console.log('已获得录音权限,可以开始录音了')
|
||||||
that.permisionState = true
|
that.permisionState = true
|
||||||
that.isCheckingPermission = false
|
that.isCheckingPermission = false
|
||||||
if (isFirstRequestPer) {
|
that.stopRecord()
|
||||||
that.stopRecord()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
(msg, isUserNotAllow) => {
|
(msg, isUserNotAllow) => {
|
||||||
that.isCheckingPermission = false
|
that.isCheckingPermission = false
|
||||||
@ -415,7 +413,7 @@ export default {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
async checkPermission(isFirstRequestPer = false) {
|
async checkPermission() {
|
||||||
let that = this
|
let that = this
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// 先判断os
|
// 先判断os
|
||||||
@ -455,7 +453,7 @@ export default {
|
|||||||
if (typeof plus !== 'undefined') {
|
if (typeof plus !== 'undefined') {
|
||||||
handleFindWebview(`handleRequestAndroidPermission('micro')`)
|
handleFindWebview(`handleRequestAndroidPermission('micro')`)
|
||||||
} else {
|
} else {
|
||||||
that.continueAppMicro(isFirstRequestPer)
|
that.continueAppMicro()
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
// #endif
|
// #endif
|
||||||
|
Loading…
Reference in New Issue
Block a user