@@ -108,7 +108,7 @@ class Metronome {
playAudio = () => {
if (!metronomeData.initPlayerState) return;
this.source = metronomeData.activeMetro?.index === 0 ? this.source1 : this.source2;
- this.source.volume(metronomeData.disable ? 0 : 0.4);
+ this.source.volume(metronomeData.disable || state.playState === 'paused' ? 0 : 0.4);
this.source.play();
};
@@ -439,15 +439,6 @@ export default defineComponent({
clearSelection();
}
console.log("加载评测模块成功");
-
- //@ts-ignore
- if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
- // 浏览器支持音频录制
- console.log('浏览器支持音频录制');
- } else {
- // 浏览器不支持音频录制
- console.log('浏览器不支持音频录制');
- }
});
onUnmounted(() => {
removeResult(handleScoreResult);