addSubtitleTrack

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


Deprecated

Use addSubtitleTrack(SubtitleTrack) instead

Replace with

addSubtitleTrack(SubtitleTrack(url))

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


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

Deprecated

Use addSubtitleTrack(SubtitleTrack) instead

Replace with

addSubtitleTrack(SubtitleTrack(url, label, id, isDefault, language))

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

Deprecated

Use addSubtitleTrack(SubtitleTrack) instead

Replace with

addSubtitleTrack(SubtitleTrack(url, mimeType, label, id, isDefault, language))

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.