aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/timeranges/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/timeranges/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/timeranges/index.html')
-rw-r--r--files/zh-cn/web/api/timeranges/index.html103
1 files changed, 103 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/timeranges/index.html b/files/zh-cn/web/api/timeranges/index.html
new file mode 100644
index 0000000000..f6cf419d4b
--- /dev/null
+++ b/files/zh-cn/web/api/timeranges/index.html
@@ -0,0 +1,103 @@
+---
+title: TimeRanges
+slug: Web/API/TimeRanges
+translation_of: Web/API/TimeRanges
+---
+<div>{{APIRef("DOM")}}</div>
+
+<div> <code>TimeRanges</code> 接口用来表示一组时间范围,主要目的是跟踪供{{HTMLElement("audio")}} 和 </div>
+
+<div>{{HTMLElement("video")}} 元素加载使用的媒体哪些部分已经被缓冲。  </div>
+
+<p>一个 <code>TimeRanges</code> 对象包括一个或多个时间范围,其中每个都由一个开始偏移量和结束偏移量指定。你可以将你想要检索的时间范围的索引值传递给 <code>start()</code> 和 <code>end()</code> 方法来引用每个时间范围。</p>
+
+<p>术语"<a class="external" href="http://www.w3.org/TR/html5/the-iframe-element.html#normalized-timeranges-object">normalized TimeRanges object</a>"指出这种对象中的范围时有序的,不重叠的,不为空并且不接触的(相邻范围被折叠成更大的范围)。</p>
+
+<h2 id="属性">属性</h2>
+
+<dl>
+ <dt>{{domxref("TimeRanges.length")}} {{ReadOnlyInline}}</dt>
+ <dd>返回一个 <code>unsigned long</code> 类型的数字。表示由time range对象表示的time ranges的数量。</dd>
+</dl>
+
+<h2 id="方法">方法</h2>
+
+<dl>
+ <dt>{{domxref("TimeRanges.start()")}}</dt>
+ <dd>返回具有指定索引的范围的开始时间。</dd>
+ <dt>{{domxref("TimeRanges.end()")}}</dt>
+ <dd>返回指定范围的结束时间。</dd>
+</dl>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName("HTML WHATWG", "embedded-content.html#time-ranges", "TimeRanges")}}</td>
+ <td>{{Spec2("HTML WHATWG")}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>