AI-generated Key Takeaways
-
MediaTrack.Builderis used to constructMediaTrackobjects. -
A new Builder is constructed with a track ID and type.
-
Various methods are available to set properties like content ID, content type, custom data, language, name, roles, and subtype.
-
The
build()method finalizes the construction and returns theMediaTrackobject.
A builder for MediaTrack
objects.
Public Constructor Summary
Public Method Summary
| MediaTrack | |
| MediaTrack.Builder | |
| MediaTrack.Builder | |
| MediaTrack.Builder | |
| MediaTrack.Builder | |
| MediaTrack.Builder | |
| MediaTrack.Builder | |
| MediaTrack.Builder | |
| MediaTrack.Builder |
Inherited Method Summary
Public Constructors
public 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
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 setRoles ( List < String > roles)
Sets the roles for this track. See ROLE_
constants.
public MediaTrack.Builder setSubtype (int subtype)
Sets the track subtype with one of the SUBTYPE_
constants.

