@UnstableApi
class CmcdData


This class provides functionality for generating and adding Common Media Client Data (CMCD) data to adaptive streaming formats, DASH, HLS, and SmoothStreaming.

It encapsulates the necessary attributes and information relevant to media content playback, following the guidelines specified in the CMCD standard document CTA-5004.

Summary

Nested types

CmcdData.Factory for CmcdData instances.

@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = [Factory.OBJECT_TYPE_INIT_SEGMENT, Factory.OBJECT_TYPE_AUDIO_ONLY, Factory.OBJECT_TYPE_VIDEO_ONLY, Factory.OBJECT_TYPE_MUXED_AUDIO_AND_VIDEO])
@Documented
@Target(value = TYPE_USE)
annotation CmcdData.ObjectType

Indicates the media type of current object being requested.

@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = [Factory.STREAM_TYPE_VOD, Factory.STREAM_TYPE_LIVE])
@Documented
@Target(value = TYPE_USE)
annotation CmcdData.StreamType

Indicates the type of streaming for media content.

@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = [Factory.STREAMING_FORMAT_DASH, Factory.STREAMING_FORMAT_HLS, Factory.STREAMING_FORMAT_SS])
@Documented
@Target(value = TYPE_USE)
annotation CmcdData.StreamingFormat

Indicates the streaming format used for media content.

Public functions

DataSpec!
addToDataSpec(dataSpec: DataSpec!)

Adds Common Media Client Data (CMCD) related information to the provided DataSpec object.

Public functions

addToDataSpec

fun addToDataSpec(dataSpec: DataSpec!): DataSpec!

Adds Common Media Client Data (CMCD) related information to the provided DataSpec object.