Back to Content

VideoFrame: duration property

files/en-us/web/api/videoframe/duration/index.md

latest438 B
Original Source

{{APIRef("Web Codecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The duration property of the {{domxref("VideoFrame")}} interface returns an integer indicating the duration of the video in microseconds.

Value

An integer.

Examples

The following example prints the duration to the console.

js
console.log(VideoFrame.duration);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}