Back to Content

ImageTrackList: selectedTrack property

files/en-us/web/api/imagetracklist/selectedtrack/index.md

latest539 B
Original Source

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

The selectedTrack property of the {{domxref("ImageTrackList")}} interface returns an {{domxref("ImageTrack")}} object representing the currently selected track.

Value

An {{domxref("ImageTrack")}} object.

Examples

The following example returns the selectedTrack then prints it to the console.

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

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}