Disable mic button if getUserMedia not available in browser

Issue #92.
This commit is contained in:
N-Pex 2021-03-18 11:58:46 +01:00
parent 1de3d2c954
commit d94bcec376
5 changed files with 33 additions and 2 deletions

View file

@ -163,6 +163,7 @@
elevation="0"
v-blur
style="z-index: 10"
:disabled="!canRecordAudio"
v-longTap:250="[showRecordingUI, startRecording]"
>
<v-icon :color="showRecorder ? 'white' : 'black'">mic</v-icon>
@ -517,6 +518,9 @@ export default {
}
return "top:" + top + "px;left:" + left + "px";
},
canRecordAudio() {
return util.browserCanRecordAudio();
}
},
watch: {

View file

@ -139,6 +139,7 @@ const State = {
};
import util from "../plugins/utils";
import VoiceRecorderLock from "./VoiceRecorderLock";
require('md-gum-polyfill');
export default {
name: "VoiceRecorder",