From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/speechsynthesis/paused/index.html | 109 +++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 files/zh-cn/web/api/speechsynthesis/paused/index.html (limited to 'files/zh-cn/web/api/speechsynthesis/paused') diff --git a/files/zh-cn/web/api/speechsynthesis/paused/index.html b/files/zh-cn/web/api/speechsynthesis/paused/index.html new file mode 100644 index 0000000000..f4c4f78f3c --- /dev/null +++ b/files/zh-cn/web/api/speechsynthesis/paused/index.html @@ -0,0 +1,109 @@ +--- +title: SpeechSynthesis.paused +slug: Web/API/SpeechSynthesis/paused +translation_of: Web/API/SpeechSynthesis/paused +--- +
{{APIRef("Web Speech API")}}{{SeeCompatTable}}
+ +

  {{domxref("SpeechSynthesis")}} 接口的只读属性 paused 是一个  {{domxref("Boolean")}} 值,当SpeechSynthesis对象处于暂停状态时,返回true ,否则返回 false。

+ +

它能被设置为 {{domxref("SpeechSynthesis.pause()", "暂停状态")}} 即使当前并没有语音在播放队列中。如果{{domxref("SpeechSynthesisUtterance","utterances")}} 被添加到语音播放队列,队列中的语音并不会播放直到使用 {{domxref("SpeechSynthesis.resume()")}}使SpeechSynthesis对象处于非暂停状态。

+ +

语法

+ +
var amIPaused = speechSynthesisInstance.paused;
+
+ +

Value

+ +

一个{{domxref("Boolean")}}。

+ +

示例

+ +
var synth = window.speechSynthesis;
+
+synth.pause();
+
+var amIPaused = synth.paused; // 将返回 true
+
+ +

特性

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Web Speech API', '#dfn-ttspaused', 'paused')}}{{Spec2('Web Speech API')}} 
+ +

浏览器通用性

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(33)}}{{CompatVersionUnknown}}{{CompatGeckoDesktop(49)}}{{CompatNo}}{{CompatUnknown}}7
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChromeEdgeFirefox Mobile (Gecko)Firefox OSIE PhoneOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}2.0{{CompatNo}}{{CompatNo}}7.1
+
+ +

请参阅

+ + -- cgit v1.2.3-54-g00ecf