Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLMediaElement
  4. seekToNextFrame()

HTMLMediaElement: seekToNextFrame() method

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see thecompatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

TheHTMLMediaElement.seekToNextFrame() methodasynchronously advances the current play position to the next frame in the media.

Warning:This non-standard method is part of an experimentation process around support fornon-real-time access to media for tasks including filtering, editing, and so forth.You shouldnot use this method in production code, because its implementationmay change—or be removed outright—without notice. You are, however, invited toexperiment with it.

This method lets you access frames of video media without the media being performed inreal time. This also lets you access media using frames as a seek unit rather thantimecodes (albeit only by seeking one frame at a time until you get to the frame youwant). Possible uses for this method include filtering and editing of video content.

This method returns immediately, returning aPromise, whose fulfillmenthandler is called when the seek operation is complete. In addition, aseeked event is sent to let interested parties know that a seek has takenplace. If the seek fails because the media is already at the last frame, aseeked event occurs, followed immediately by anended event.

If there is no video on the media element, or the media isn't seekable, nothinghappens.

Syntax

js
seekToNextFrame()

Parameters

None.

Return value

APromise which is fulfilled once the seek operation has completed.

Specifications

Not part of any specification.

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp