1
0
Fork 0

修复了bug407:划词朗读时,会结束之前的朗读,直接重新开始新的划词朗读。

BugFix407-JinHaoLin
AAAzsf 2022-06-06 15:54:22 +08:00
parent b9cf94da74
commit e8b7b2e4dc
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ function fillinWord(){
} }
document.getElementById("text-content").addEventListener("click", fillinWord, false); document.getElementById("text-content").addEventListener("click", fillinWord, false);
function read(s){ function read(s){
reader.cancel();
var msg = new SpeechSynthesisUtterance(s); var msg = new SpeechSynthesisUtterance(s);
reader.speak(msg); reader.speak(msg);
} }