nsIDOMHTMLTimeRanges 编辑

The nsIDOMHTMLTimeRanges interface represents a set of time ranges in media; it's primarily used by the nsIDOMHTMLMediaElement interface, and implements the DOM TimeRanges interface.

Each time range represented by an nsIDOMHTMLTimeRanges object has an index number; you call the start() and end() methods to obtain the start and end times of each range, specifying the index number of the range to look up.

dom/interfaces/html/nsIDOMHTMLTimeRanges.idlScriptable Please add a summary to this article.   Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Inherits from: nsISupports

Method overview

float start(in unsigned long index);
float end(in unsigned long index);

Attributes

AttributeTypeDescription
lengthunsigned long
The number of ranges represented by the nsIDOMHTMLTimeRanges object. Read only.

Methods

end()

Returns the time offset to the end of the specified time range.

float end(
  in unsigned long index
);
Parameters
index
The index to the time range whose end time is to be returned.
Return value

The time at which the specified range ends, in seconds measured from the beginning of the timeline represented by the object.

Exceptions thrown
INDEX_SIZE_ERR
The specified index is not valid.

start()

Returns the time offset to the start of the specified time range.

float start(
  in unsigned long index
);
Parameters
index
The index to the time range whose start time is to be returned.
Return value

The time at which the specified range starts, in seconds measured from the beginning of the timeline represented by the object.

Exceptions thrown
INDEX_SIZE_ERR
The specified index is not valid.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:118 次

字数:4521

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文