|
|
@@ -155,7 +155,19 @@ export default {
|
|
|
iframe.contentWindow.ConversationTranscriber();
|
|
|
this.recordObj.status = "1"
|
|
|
this.recordObj.startTime = new Date().getTime();
|
|
|
-
|
|
|
+ setTimeout(()=>{
|
|
|
+ navigator.permissions && navigator.permissions.query({ name: 'microphone' }).then(permissionStatus => {
|
|
|
+ if (permissionStatus.state !== "granted") {
|
|
|
+ // 没有开启录音权限,直接确定停止录音
|
|
|
+ this.recordObj.status = "0";
|
|
|
+ this.recordObj.loading = false;
|
|
|
+ iframe.contentWindow.onSessionStopped = null;
|
|
|
+ iframe.contentWindow.window.onRecognizedResult = null;
|
|
|
+ this.$message.success(this.lang.ssNoPermStop);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },2000)
|
|
|
},
|
|
|
stopRecord() {
|
|
|
console.log("测试测试")
|