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.

MDN Reference