feat: supported background TTS with media session controls, closes #2099 and closes #964 (#2138)

This commit is contained in:
Huang Xin
2025-09-30 01:45:17 +08:00
committed by GitHub
parent 25b44176b9
commit 0a1e0212e2
49 changed files with 1105 additions and 57 deletions
@@ -263,7 +263,7 @@ export function useTextTranslation(
);
useEffect(() => {
if (viewState?.ttsEnabled && progress && document.hidden) {
if (enabled.current && viewState?.ttsEnabled && progress && document.hidden) {
const { range } = progress;
translateInRange(range);
}