CompositionFrameMetadata


@ExperimentalApi
class CompositionFrameMetadata : HardwareBufferFrame.Metadata


Metadata included on HardwareBufferFrames in CompositionPlayer.

Applications can extend this class to add custom metadata.

Summary

Constants

const String!
KEY_COMPOSITION_FRAME_METADATA = "KEY_COMPOSITION_FRAME_METADATA"

This property is deprecated.

Use KEY_COMPOSITION, KEY_COMPOSITION_SEQUENCE_INDEX and KEY_COMPOSITION_ITEM_INDEX instead.

Public constructors

CompositionFrameMetadata(
    composition: Composition!,
    sequenceIndex: Int,
    itemIndex: Int
)

Creates a new instance.

Public functions

java-static ImmutableMap<String!, Any!>!
@RequiresApi(value = 26)
asFrameMetadata(compositionFrameMetadata: CompositionFrameMetadata!)

Converts the CompositionFrameMetadata to a map for getMetadata.

Public properties

Composition!

The Composition that this frame belongs to.

Int

The media item index in the sequence that this frame belongs to.

Int

The sequence index in the composition that this frame belongs to.

Constants

KEY_COMPOSITION_FRAME_METADATA

const val KEY_COMPOSITION_FRAME_METADATA = "KEY_COMPOSITION_FRAME_METADATA": String!

Metadata key for storing the composition frame metadata.

Public constructors

CompositionFrameMetadata

CompositionFrameMetadata(
    composition: Composition!,
    sequenceIndex: Int,
    itemIndex: Int
)

Creates a new instance.

Public functions

asFrameMetadata

@RequiresApi(value = 26)
java-static fun asFrameMetadata(compositionFrameMetadata: CompositionFrameMetadata!): ImmutableMap<String!, Any!>!

Converts the CompositionFrameMetadata to a map for getMetadata.

Public properties

composition

val compositionComposition!

The Composition that this frame belongs to.

itemIndex

val itemIndexInt

The media item index in the sequence that this frame belongs to.

sequenceIndex

val sequenceIndexInt

The sequence index in the composition that this frame belongs to.