SpeechSynthesis.paused
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2018.
SpeechSynthesis
接口的只读属性 paused
是一个 Boolean
值,当SpeechSynthesis
对象处于暂停状态时,返回true
,否则返回 false
。
它能被设置为 暂停状态
即使当前并没有语音在播放队列中。如果utterances
被添加到语音播放队列,队列中的语音并不会播放直到使用 SpeechSynthesis.resume()
使SpeechSynthesis
对象处于非暂停状态。
语法
var amIPaused = speechSynthesisInstance.paused;
Value
一个Boolean
。
示例
js
var synth = window.speechSynthesis;
synth.pause();
var amIPaused = synth.paused; // 将返回 true
规范
Specification |
---|
Web Speech API # dom-speechsynthesis-paused |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
paused |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.