Audio zoekbaar 属性

定义和用法

zoekbaar 属性返回 TimeRanges 对象。

TimeRanges 对象表示可供用户搜索(seeking,检索)的音频范围。

可搜索范围是用户可以搜索(移动播放位置)到的音频时间范围。

对于非流式音频,即使在缓冲之前,通常也可以在音频中的任何位置搜索。

Note:该属性只读。

实例

获取音频的第一个可搜索范围(部分)(以秒为单位):

var x = document.getElementById("myAudio");
document.getElementById("demo").innerHTML = "Start: " + x.zoekbaar.begin(0)
+ "Einde: " + x.zoekbaar.einde(0);

亲自试一试

语法

audioObject.zoekbaar

返回值

Return value Type
Description

TimeRanges object

Represents the searchable part of the audio.

  • TimeRanges object properties:
  • length - Get the number of searchable ranges in the audioindexstart(
  • ) - Get the start position of the searchable rangeindex) - Get the end position of the searchable range

Note:The first searchable range is index 0.

Browser support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support