The id read-only property of the TextTrack interface returns the ID of the track if it has one.
id
external String get id;