Back to Content

ImageTrack: frameCount property

files/en-us/web/api/imagetrack/framecount/index.md

latest464 B
Original Source

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The frameCount property of the {{domxref("ImageTrack")}} interface returns the number of frames in the track.

Value

An integer.

Examples

The following example prints the value of frameCount to the console.

js
let track = imageDecoder.tracks.selectedTrack;
console.log(track.frameCount);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}