SpeechSynthesis: paused 屬性

Baseline 已廣泛支援

此功能已成熟,並可在多種裝置和瀏覽器版本上使用。自 2018 年 9 月以來,它已在各種瀏覽器中推出。

pausedSpeechSynthesis 介面的一個只讀布林屬性。如果 SpeechSynthesis 物件處於暫停狀態,它返回 true,否則返回 false

即使當前沒有透過它播放任何內容,也可以將其設定為 paused。如果隨後將 utterances 新增到話語佇列中,在不使用 SpeechSynthesis.resume() 解除 SpeechSynthesis 物件的暫停之前,它們將不會被播放。

一個布林值。

示例

js
const synth = window.speechSynthesis;

synth.pause();

const amIPaused = synth.paused; // will return true

規範

規範
Web Speech API
# dom-speechsynthesis-paused

瀏覽器相容性

另見