| | |
| | | |
| | | <script setup lang="ts"> |
| | | import { ElMessage } from 'element-plus'; |
| | | import { ref } from 'vue'; |
| | | import VoicePage from './voicePage/VoicePage.vue'; |
| | | const emits = defineEmits(['sendClick']); |
| | | |
| | |
| | | } |
| | | }; |
| | | const audioChangeWord = () => { |
| | | // navigator.getUserMedia( |
| | | // { audio: true }, |
| | | // function onSuccess(stream) { |
| | | // voicePageIsShow.value = true; |
| | | // }, |
| | | // function onError(error) { |
| | | // ElMessage.warning('请打开麦克风权限'); |
| | | // } |
| | | // ); |
| | | navigator.getUserMedia( |
| | | { audio: true }, |
| | | function onSuccess(stream) { |
| | | voicePageIsShow.value = true; |
| | | }, |
| | | function onError(error) { |
| | | ElMessage.warning('请打开麦克风权限'); |
| | | } |
| | | ); |
| | | |
| | | voicePageIsShow.value = true; |
| | | |
| | | }; |
| | | </script> |