Added in API level 29

Builder


class Builder
kotlin.Any
   ↳ android.media.AudioPresentation.Builder

A builder class for creating AudioPresentation objects.

Summary

Public constructors
Builder(presentationId: Int)

Create a Builder.

Public methods
AudioPresentation

Creates a AudioPresentation instance with the specified fields.

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

Sets locale / text label pairs describing the presentation.

AudioPresentation.Builder
setLocale(language: ULocale)

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

Added in API level 29
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

Added in API level 29
fun build(): AudioPresentation

Creates a AudioPresentation instance with the specified fields.

Return
AudioPresentation The new AudioPresentation instance This value cannot be null.

setHasAudioDescription

Added in API level 29
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

Added in API level 29
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

Added in API level 29
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

Added in API level 29
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

Added in API level 29
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.

setProgramId

Added in API level 29
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.