A builder for MediaTrack
objects.
Public Constructor Summary
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 | |
MediaTrack.Builder | |
MediaTrack.Builder | |
MediaTrack.Builder | |
MediaTrack.Builder | |
MediaTrack.Builder | |
MediaTrack.Builder | |
MediaTrack.Builder |
setSubtype(int subtype)
Sets the track subtype with one of the
SUBTYPE_ constants.
|
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
IllegalArgumentException | if the track type is negative |
---|
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.
Throws
IllegalArgumentException | If the subtype is invalid. |
---|