MediaTrack.Builder

public static class MediaTrack.Builder extends Object

A builder for MediaTrack objects.

Public Constructor Summary

MediaTrack.Builder(long trackId, int trackType)
Constructs a new Builder with the given track ID and type.

Public Method Summary

MediaTrack
build()
Builds and returns the MediaTrack object.
MediaTrack.Builder
setContentId(String contentId)
Sets the track content ID.
MediaTrack.Builder
setContentType(String contentType)
Sets the track content type.
MediaTrack.Builder
setCustomData(JSONObject customData)
Sets the track's custom data object.
MediaTrack.Builder
setLanguage(String language)
Sets the RFC-5464 formatted track language.
MediaTrack.Builder
setLanguage(Locale locale)
Sets the track language from a Locale in RFC-5464 format.
MediaTrack.Builder
setName(String trackName)
Sets the track name.
MediaTrack.Builder
setSubtype(int subtype)
Sets the track subtype with one of the SUBTYPE_ constants.

Inherited Method Summary

Public Constructors

public MediaTrack.Builder (long trackId, int trackType)

Constructs a new Builder with the given track ID and type.

Parameters
trackId The unique ID of the media track.
trackType The type of the track; one of the TYPE_ constants.
Throws
IllegalArgumentException If the track type is invalid.

Public Methods

public MediaTrack build ()

Builds and returns the MediaTrack object.

public MediaTrack.Builder setContentId (String contentId)

Sets the track content ID.

public MediaTrack.Builder setContentType (String contentType)

Sets the track content type.

public MediaTrack.Builder setCustomData (JSONObject customData)

Sets the track's custom data object.

public MediaTrack.Builder setLanguage (String language)

Sets the RFC-5464 formatted track language.

public MediaTrack.Builder setLanguage (Locale locale)

Sets the track language from a Locale in RFC-5464 format.

public MediaTrack.Builder setName (String trackName)

Sets the track name.

public MediaTrack.Builder setSubtype (int subtype)

Sets the track subtype with one of the SUBTYPE_ constants.

Throws
IllegalArgumentException If the subtype is invalid.