diff options
author | MDN <actions@users.noreply.github.com> | 2021-10-14 00:47:38 +0000 |
---|---|---|
committer | MDN <actions@users.noreply.github.com> | 2021-10-14 00:47:38 +0000 |
commit | df821208c608de1b7cdc6fe69ae28724ac1f01a0 (patch) | |
tree | 265d5165067499173a2b36626798e3504b291909 /files/zh-cn/web/api | |
parent | d362676d3d14ab1bf938c80a90b7a6f2665d9f3c (diff) | |
download | translated-content-df821208c608de1b7cdc6fe69ae28724ac1f01a0.tar.gz translated-content-df821208c608de1b7cdc6fe69ae28724ac1f01a0.tar.bz2 translated-content-df821208c608de1b7cdc6fe69ae28724ac1f01a0.zip |
[CRON] sync translated content
Diffstat (limited to 'files/zh-cn/web/api')
-rw-r--r-- | files/zh-cn/web/api/effecttiming/index.html | 78 | ||||
-rw-r--r-- | files/zh-cn/web/api/keyframeeffect/keyframeeffect/index.html (renamed from files/zh-cn/web/api/effecttiming/easing/index.html) | 3 | ||||
-rw-r--r-- | files/zh-cn/web/api/rtcconfiguration/index.html | 66 |
3 files changed, 2 insertions, 145 deletions
diff --git a/files/zh-cn/web/api/effecttiming/index.html b/files/zh-cn/web/api/effecttiming/index.html deleted file mode 100644 index f0b2b7c289..0000000000 --- a/files/zh-cn/web/api/effecttiming/index.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: EffectTiming -slug: Web/API/EffectTiming -tags: - - API - - Animation - - Dictionary - - EffectTiming - - Experimental - - Interface - - KeyframeEffect - - NeedsTranslation - - Reference - - TopicStub - - Web Animations - - animate - - web animations api -translation_of: Web/API/EffectTiming ---- -<div>{{ SeeCompatTable() }}{{ APIRef("Web Animations") }}</div> - -<p>The <strong><code>EffectTiming</code></strong> dictionary, part of the <a href="/en-US/docs/Web/API/Web_Animations_API">Web Animations API</a>, is used by {{domxref("Element.animate()")}}, {{domxref("KeyframeEffectReadOnly.KeyframeEffectReadOnly", "KeyframeEffectReadOnly()")}}, and {{domxref("KeyframeEffect.KeyframeEffect", "KeyframeEffect()")}} to describe timing properties for animation effects. These properties are all optional, although without setting a <code>duration</code> the animation will not play.</p> - -<p>Simply put, these properties describe how the {{Glossary("user agent")}} should go about making the transition from keyframe to keyframe, and how to behave when the animation begins and ends.</p> - -<h2 id="Properties">Properties</h2> - -<dl> - <dt>{{domxref("EffectTiming.delay", "delay")}} {{optional_inline}}</dt> - <dd>The number of milliseconds to delay the start of the animation. Defaults to 0.</dd> - <dt>{{domxref("EffectTiming.direction", "direction")}} {{optional_inline}}</dt> - <dd>Whether the animation runs forwards (<code>normal</code>), backwards (<code>reverse</code>), switches direction after each iteration (<code>alternate</code>), or runs backwards and switches direction after each iteration (<code>alternate-reverse</code>). Defaults to <code>"normal"</code>.</dd> - <dt>{{domxref("EffectTiming.duration", "duration")}} {{optional_inline}}</dt> - <dd>The number of milliseconds each iteration of the animation takes to complete. Defaults to 0. Although this is technically optional, keep in mind that your animation will not run if this value is 0.</dd> - <dt>{{domxref("EffectTiming.easing", "easing")}} {{optional_inline}}</dt> - <dd>The rate of the animation's change over time. Accepts the pre-defined values <code>"linear"</code>, <code>"ease"</code>, <code>"ease-in"</code>, <code>"ease-out"</code>, and <code>"ease-in-out"</code>, or a custom <code>"cubic-bezier"</code> value like <code>"cubic-bezier(0.42, 0, 0.58, 1)"</code>. Defaults to <code>"linear"</code>.</dd> - <dt>{{domxref("EffectTiming.endDelay", "endDelay")}} {{optional_inline}}</dt> - <dd>The number of milliseconds to delay after the end of an animation. This is primarily of use when sequencing animations based on the end time of another animation. Defaults to 0. </dd> - <dt>{{domxref("EffectTiming.fill", "fill")}} {{optional_inline}}</dt> - <dd>Dictates whether the animation's effects should be reflected by the element(s) prior to playing (<code>"backwards"</code>), retained after the animation has completed playing (<code>"forwards"</code>), or <code>both</code>. Defaults to <code>"none"</code>.</dd> - <dt>{{domxref("EffectTiming.iterationStart", "iterationStart")}} {{optional_inline}}</dt> - <dd>Describes at what point in the iteration the animation should start. 0.5 would indicate starting halfway through the first iteration for example, and with this value set, an animation with 2 iterations would end halfway through a third iteration. Defaults to 0.0.</dd> - <dt>{{domxref("EffectTiming.iterations", "iterations")}} {{optional_inline}}</dt> - <dd>The number of times the animation should repeat. Defaults to <code>1</code>, and can also take a value of {{jsxref("Infinity")}} to make it repeat for as long as the element exists.</dd> -</dl> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('Web Animations', '#the-effecttiming-dictionaries', 'EffectTiming' )}}</td> - <td>{{Spec2('Web Animations')}}</td> - <td>Initial definition</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - - - -<p>{{Compat("api.EffectTiming")}}</p> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="/en-US/docs/Web/API/Web_Animations_API">Web Animations API</a></li> - <li><a href="/en-US/docs/Web/API/Web_Animations_API/Using_the_Web_Animations_API">Using the Web Animations API</a></li> - <li>{{domxref("Element.animate()")}}</li> - <li>{{domxref("KeyframeEffect.KeyframeEffect", "KeyframeEffect()")}}</li> - <li>{{domxref("KeyframeEffectReadOnly.KeyframeEffectReadOnly", "KeyframeEffectReadOnly()")}}</li> -</ul> diff --git a/files/zh-cn/web/api/effecttiming/easing/index.html b/files/zh-cn/web/api/keyframeeffect/keyframeeffect/index.html index 0ee0bfea9f..08c21a6791 100644 --- a/files/zh-cn/web/api/effecttiming/easing/index.html +++ b/files/zh-cn/web/api/keyframeeffect/keyframeeffect/index.html @@ -1,7 +1,8 @@ --- title: EffectTiming.easing -slug: Web/API/EffectTiming/easing +slug: Web/API/KeyframeEffect/KeyframeEffect translation_of: Web/API/EffectTiming/easing +original_slug: Web/API/EffectTiming/easing --- <div>{{ SeeCompatTable() }}{{ APIRef("Web Animations") }}</div> diff --git a/files/zh-cn/web/api/rtcconfiguration/index.html b/files/zh-cn/web/api/rtcconfiguration/index.html deleted file mode 100644 index ace1a5c5b6..0000000000 --- a/files/zh-cn/web/api/rtcconfiguration/index.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: RTCConfiguration -slug: Web/API/RTCConfiguration -translation_of: Web/API/RTCConfiguration ---- -<p>{{APIRef("WebRTC")}}{{draft}}</p> - -<p>The <strong><code>RTCConfiguration</code></strong> dictionary is used to provide configuration options for an {{domxref("RTCPeerConnection")}}. It may be passed into the constructor when instantiating a connection, or used with the {{domxref("RTCPeerConnection.getConfiguration()")}} and {{domxref("RTCPeerConnection.setConfiguration()")}} methods, which allow inspecting and changing the configuration while a connection is established.</p> - -<p>The options include ICE server and transport settings and identity information.</p> - -<h2 id="Properties">Properties</h2> - -<dl> - <dt><code>bundlePolicy</code> {{optional_inline}}</dt> - <dd>Specifies how to handle negotiation of candidates when the remote peer is not compatible with the <a href="https://webrtcstandards.info/sdp-bundle/">SDP BUNDLE standard</a>. This must be one of the values from the enum <code><a href="#RTCBundlePolicy_enum">RTCBundlePolicy</a></code>. If this value isn't included in the dictionary, <code>"balanced"</code> is assumed.</dd> - <dt><code>certificates</code> {{optional_inline}}</dt> - <dd>An {{jsxref("Array")}} of objects of type {{domxref("RTCCertificate")}} which are used by the connection for authentication. If this property isn't specified, a set of certificates is generated automatically for each {{domxref("RTCPeerConnection")}} instance. Although only one certificate is used by a given connection, providing certificates for multiple algorithms may improve the odds of successfully connecting in some circumstances. See {{anch("Using certificates")}} below for additional information. - <div class="note">This configuration option cannot be changed after it is first specified; once the certificates have been set, this property is ignored in future calls to {{domxref("RTCPeerConnection.setConfiguration()")}}.</div> - </dd> - <dt><code>iceCandidatePoolSize</code> {{optional_inline}}</dt> - <dd>一个16bit无符号整型值,代表预获取的ICE candidate pool的大小。 默认为 0 (意味着不会发生candidate的预获取)。在某些情况下,由于预获取了ICE candidate,在 {{domxref("RTCPeerConnection.setLocalDescription()")}} 被调用时,被预获取的candidate可被立刻检查,从而导致可以更快的建立连接。 - <div class="note">改变 ICE candidate pool的大小将触发启动 ICE gathering。</div> - </dd> - <dt><code>iceServers</code> {{optional_inline}}</dt> - <dd>An array of {{domxref("RTCIceServer")}} objects, each describing one server which may be used by the ICE agent; these are typically STUN and/or TURN servers. If this isn't specified, the ICE agent may choose to use its own ICE servers; otherwise, the connection attempt will be made with no STUN or TURN server available, which limits the connection to local peers.</dd> - <dt><code>iceTransportPolicy</code> {{optional_inline}}</dt> - <dd>The current ICE transport policy; this must be one of the values from the <code><a href="#RTCIceTransportPolicy_enum">RTCIceTransportPolicy</a></code> enum. If this isn't specified, <code>"all"</code> is assumed.</dd> - <dt><code>peerIdentity</code> {{optional_inline}}</dt> - <dd>A {{domxref("DOMString")}} which specifies the target peer identity for the {{domxref("RTCPeerConnection")}}. If this value is set (it defaults to <code>null</code>), the <code>RTCPeerConnection</code> will not connect to a remote peer unless it can successfully authenticate with the given name.</dd> - <dt><code>rtcpMuxPolicy</code> {{optional_inline}}</dt> - <dd>The RTCP mux policy to use when gathering ICE candidates, in order to support non-multiplexed RTCP. The value must be one of those from the <a href="#RTCRtcpMuxPolicy_enum"><code>RTCRtcpMuxPolicy</code> enum</a>. The default is <code>"require"</code>.</dd> -</dl> - -<h2 id="Constants">Constants</h2> - -<p>{{page("/en-US/docs/Web/API/RTCPeerConnection", "RTCBundlePolicy enum", 0, 1)}}</p> - -<p>{{page("/en-US/docs/Web/API/RTCPeerConnection", "RTCIceTransportPolicy enum", 0, 1)}}</p> - -<p>{{page("/en-US/docs/Web/API/RTCPeerConnection", "RTCRtcpMuxPolicy enum", 0, 1)}}</p> - -<h2 id="Using_certificates">Using certificates</h2> - -<p>When you wish to provide your own certificates for use by an {{domxref("RTCPeerConnection")}} instead of having the <code>RTCPeerConnection</code> generate them automatically, you do so through calls to {{domxref("RTCPeerConnection.generateCertificate()")}}.</p> - -<p>This attribute supports providing multiple certificates because even though a given DTLS connection uses only one certificate, providing multiple certificates allows support for multiple encryption algorithms. The implementation of <code>RTCPeerConnection</code> will choose which certificate to use based on the algorithms it and the remote peer support, as determined during DTLS handshake.</p> - -<p>If you don't provide certificates, new ones are generated automatically. One obvious benefit to providing your own is identity key continuity—if you use the same certificate for subsequent calls, the remote peer can tell you're the same caller. This also avoids the cost of generating new keys.</p> - -<p><<<link to added info on identity>>></p> - -<h2 id="Example">Example</h2> - -<p>The configuration below establishes two ICE servers. The first one, <code>stun:stun.services.mozilla.com</code>, requires authentication, so the username and password are provided. The second server has two URLs: <code>stun:stun.example.com</code> and <code>stun:stun-1.example.com</code>.</p> - -<pre class="brush: js">var configuration = { iceServers: [{ - urls: "stun:stun.services.mozilla.com", - username: "louis@mozilla.com", - credential: "webrtcdemo" - }, { - urls: ["stun:stun.example.com", "stun:stun-1.example.com"] - }] -}; - -var pc = new RTCPeerConnection(configuration);</pre> |