Builder
class Builder
| kotlin.Any | |
| ↳ | android.media.AudioPresentation.Builder |
A builder class for creating AudioPresentation objects.
Summary
| Public constructors | |
|---|---|
|
Create a |
|
| Public methods | |
|---|---|
| AudioPresentation |
build()Creates a |
| AudioPresentation.Builder |
setHasAudioDescription(audioDescriptionAvailable: Boolean)Indicate whether the presentation contains audio description for the visually impaired. |
| AudioPresentation.Builder |
setHasDialogueEnhancement(dialogueEnhancementAvailable: Boolean)Indicate whether the presentation supports dialogue enhancement. |
| AudioPresentation.Builder |
setHasSpokenSubtitles(spokenSubtitlesAvailable: Boolean)Indicate whether the presentation contains spoken subtitles for the visually impaired. |
| AudioPresentation.Builder |
setLabels(labels: MutableMap<ULocale!, CharSequence!>)Sets locale / text label pairs describing the presentation. |
| AudioPresentation.Builder |
Sets the language information of the audio presentation. |
| AudioPresentation.Builder |
setMasteringIndication(masteringIndication: Int)Sets the mastering indication. |
| AudioPresentation.Builder |
setProgramId(programId: Int)Sets the ProgramId to which this audio presentation refers. |
Public constructors
Builder
Builder(presentationId: Int)
Create a Builder. Any field that should be included in the AudioPresentation must be added.
| Parameters | |
|---|---|
presentationId |
Int: The presentation ID of this audio presentation. |
Public methods
build
fun build(): AudioPresentation
Creates a AudioPresentation instance with the specified fields.
| Return | |
|---|---|
AudioPresentation |
The new AudioPresentation instance This value cannot be null. |
setHasAudioDescription
fun setHasAudioDescription(audioDescriptionAvailable: Boolean): AudioPresentation.Builder
Indicate whether the presentation contains audio description for the visually impaired.
| Parameters | |
|---|---|
audioDescriptionAvailable |
Boolean: Audio description for the visually impaired. |
| Return | |
|---|---|
AudioPresentation.Builder |
This value cannot be null. |
setHasDialogueEnhancement
fun setHasDialogueEnhancement(dialogueEnhancementAvailable: Boolean): AudioPresentation.Builder
Indicate whether the presentation supports dialogue enhancement.
| Parameters | |
|---|---|
dialogueEnhancementAvailable |
Boolean: Dialogue enhancement. |
| Return | |
|---|---|
AudioPresentation.Builder |
This value cannot be null. |
setHasSpokenSubtitles
fun setHasSpokenSubtitles(spokenSubtitlesAvailable: Boolean): AudioPresentation.Builder
Indicate whether the presentation contains spoken subtitles for the visually impaired.
| Parameters | |
|---|---|
spokenSubtitlesAvailable |
Boolean: Spoken subtitles for the visually impaired. |
| Return | |
|---|---|
AudioPresentation.Builder |
This value cannot be null. |
setLabels
fun setLabels(labels: MutableMap<ULocale!, CharSequence!>): AudioPresentation.Builder
Sets locale / text label pairs describing the presentation.
| Parameters | |
|---|---|
labels |
MutableMap<ULocale!, CharSequence!>: Text label indexed by its locale corresponding to the language code. This value cannot be null. |
| Return | |
|---|---|
AudioPresentation.Builder |
This value cannot be null. |
setLocale
fun setLocale(language: ULocale): AudioPresentation.Builder
Sets the language information of the audio presentation.
| Parameters | |
|---|---|
language |
ULocale: Locale corresponding to ISO 639-1/639-2 language code. This value cannot be null. |
| Return | |
|---|---|
AudioPresentation.Builder |
This value cannot be null. |
setMasteringIndication
fun setMasteringIndication(masteringIndication: Int): AudioPresentation.Builder
Sets the mastering indication.
| Parameters | |
|---|---|
masteringIndication |
Int: Input to set mastering indication. Value is android.media.AudioPresentation#MASTERING_NOT_INDICATED, android.media.AudioPresentation#MASTERED_FOR_STEREO, android.media.AudioPresentation#MASTERED_FOR_SURROUND, android.media.AudioPresentation#MASTERED_FOR_3D, or android.media.AudioPresentation#MASTERED_FOR_HEADPHONE |
| Return | |
|---|---|
AudioPresentation.Builder |
This value cannot be null. |
| Exceptions | |
|---|---|
java.lang.IllegalArgumentException |
if the mastering indication is not any of AudioPresentation.MASTERING_NOT_INDICATED, AudioPresentation.MASTERED_FOR_STEREO, AudioPresentation.MASTERED_FOR_SURROUND, AudioPresentation.MASTERED_FOR_3D, and AudioPresentation.MASTERED_FOR_HEADPHONE |
setProgramId
fun setProgramId(programId: Int): AudioPresentation.Builder
Sets the ProgramId to which this audio presentation refers.
| Parameters | |
|---|---|
programId |
Int: The program ID to be decoded. |
| Return | |
|---|---|
AudioPresentation.Builder |
This value cannot be null. |