addSubtitleTrack

fun addSubtitleTrack(url: String?): SubtitleTrack

Generates a SubtitleTrack with the provided url and adds it to this SourceConfig. Returns the SubtitleTrack that was added.

fun addSubtitleTrack(subtitleTrack: SubtitleTrack): SubtitleTrack

Adds the provided SubtitleTrack to this SourceConfig. Returns the SubtitleTrack that was added.

fun addSubtitleTrack(url: String?, label: String?, id: String, isDefault: Boolean, language: String?): SubtitleTrack

Generates a SubtitleTrack with the provided parameter and adds it to this SourceConfig.

Return

The SubtitleTrack that was added.

Parameters

url

The URL of the SubtitleTrack.

label

The label of the SubtitleTrack.

id

The ID of the SubtitleTrack.

isDefault

If the SubtitleTrack is the default track.

language

The language identifier of the SubtitleTrack.

fun addSubtitleTrack(url: String?, mimeType: String?, label: String?, id: String, isDefault: Boolean, language: String?): SubtitleTrack

Generates a SubtitleTrack with the provided parameter and adds it to this SourceConfig.

Return

The SubtitleTrack that was added.

Parameters

url

The URL of the SubtitleTrack.

mimeType

The mime type of the SubtitleTrack.

label

The label of the SubtitleTrack.

id

The ID of the SubtitleTrack.

isDefault

If the SubtitleTrack is the default track.

language

The language identifier of the SubtitleTrack.