Commit 2ac78a5f authored by yangsiqi's avatar yangsiqi

fix: 安卓手机浏览器支持

parent d83955b1
Pipeline #92899 passed with stages
......@@ -523,7 +523,7 @@ class Notifier {
}
}
speak = msg => {
if (!this.speakState) return;
if (!this.speakState || !window.speechSynthesis) return;
this.speakState.text = msg;
window.speechSynthesis.cancel();
window.speechSynthesis.speak(this.speakState);
......
......@@ -247,6 +247,7 @@ export const AppInitState = () => {
// 语音播报全局拦截
const initMessageVoice = () => {
if (!window.speechSynthesis) return;
const rawSpeak = window.speechSynthesis.speak;
window.speechSynthesis.speak = function (...args) {
if (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment