HTMLMediaElement: fastSeek() method

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("HTML DOM")}}

The **HTMLMediaElement.fastSeek()** method quickly seeks the media to the new time with precision tradeoff.

توجه: If you need to seek with precision, you should set [HTMLMediaElement.currentTime](/en-US/docs/Web/API/HTMLMediaElement/currentTime) instead.

Syntax

js-nolint
fastSeek(time)

Parameters

  • time
  • : A double.

Return value

None ({{jsxref("undefined")}}).

Examples

This example quickly seeks to 20-second position of the video element.

js
let myVideo = document.getElementById("myVideoElement");

myVideo.fastSeek(20);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

for seeking without precision tradeoff