--- title: SpeechSynthesis.paused slug: Web/API/SpeechSynthesis/paused translation_of: Web/API/SpeechSynthesis/paused ---
{{domxref("SpeechSynthesis")}} 接口的只读属性 paused
是一个 {{domxref("Boolean")}} 值,当SpeechSynthesis
对象处于暂停状态时,返回true
,否则返回 false。
它能被设置为 {{domxref("SpeechSynthesis.pause()", "暂停状态")}} 即使当前并没有语音在播放队列中。如果{{domxref("SpeechSynthesisUtterance","utterances")}} 被添加到语音播放队列,队列中的语音并不会播放直到使用 {{domxref("SpeechSynthesis.resume()")}}使SpeechSynthesis
对象处于非暂停状态。
var amIPaused = speechSynthesisInstance.paused;
一个{{domxref("Boolean")}}。
var synth = window.speechSynthesis; synth.pause(); var amIPaused = synth.paused; // 将返回 true
Specification | Status | Comment |
---|---|---|
{{SpecName('Web Speech API', '#dfn-ttspaused', 'paused')}} | {{Spec2('Web Speech API')}} |