addTextTrack

fun addTextTrack(kind: TextTrackKind, label: String = definedExternally, language: String = definedExternally): TextTrack(source)

The addTextTrack() method of the HTMLMediaElement interface creates a new TextTrack object and adds it to the media element. It fires an addtrack event on this media element's textTracks. This method can't be used on a TextTrackList interface, only an HTMLMediaElement.

MDN Reference