CmcdConfiguration


@UnstableApi
class CmcdConfiguration


Represents a configuration for the Common Media Client Data (CMCD) logging.

Summary

Nested types

@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = )
@Documented
@Target(value = TYPE_USE)
annotation CmcdConfiguration.CmcdKey

Indicates that the annotated element represents a CMCD key.

@Retention(value = RetentionPolicy.SOURCE)
@IntDef(value = )
@Documented
@Target(value = TYPE_USE)
annotation CmcdConfiguration.DataTransmissionMode

Indicates the mode used for data transmission.

Factory for CmcdConfiguration instances.

@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = )
@Documented
@Target(value = TYPE_USE)
annotation CmcdConfiguration.HeaderKey

Header keys SHOULD be allocated to one of the four defined header names based upon their expected level of variability:

Represents configuration which can vary on each request.

Constants

const String!
const String!
const String!
const String!
const String!
KEY_CMCD_OBJECT = "CMCD-Object"
const String!
KEY_CMCD_REQUEST = "CMCD-Request"
const String!
KEY_CMCD_SESSION = "CMCD-Session"
const String!
KEY_CMCD_STATUS = "CMCD-Status"
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const String!
const Int

Maximum length for ID fields.

const Int
const Int

Public constructors

CmcdConfiguration(
    sessionId: String?,
    contentId: String?,
    requestConfig: CmcdConfiguration.RequestConfig!
)

Creates an instance with dataTransmissionMode set to MODE_REQUEST_HEADER.

CmcdConfiguration(
    sessionId: String?,
    contentId: String?,
    requestConfig: CmcdConfiguration.RequestConfig!,
    @CmcdConfiguration.DataTransmissionMode dataTransmissionMode: Int
)

Creates an instance.

Public functions

Boolean

Returns whether logging bitrate is allowed based on the request configuration.

Boolean

Returns whether logging buffer length is allowed based on the request configuration.

Boolean

Returns whether logging buffer starvation is allowed based on the request configuration.

Boolean

Returns whether logging content ID is allowed based on the request configuration.

Boolean

Returns whether logging deadline is allowed based on the request configuration.

Boolean

Returns whether logging maximum requested throughput is allowed based on the request configuration.

Boolean

Returns whether logging measured throughput is allowed based on the request configuration.

Boolean

Returns whether logging next object request is allowed based on the request configuration.

Boolean

Returns whether logging next range request is allowed based on the request configuration.

Boolean

Returns whether logging object duration is allowed based on the request configuration.

Boolean

Returns whether logging object type is allowed based on the request configuration.

Boolean

Returns whether logging playback rate is allowed based on the request configuration.

Boolean

Returns whether logging session ID is allowed based on the request configuration.

Boolean

Returns whether logging startup is allowed based on the request configuration.

Boolean

Returns whether logging stream type is allowed based on the request configuration.

Boolean

Returns whether logging streaming format is allowed based on the request configuration.

Boolean

Returns whether logging top bitrate is allowed based on the request configuration.

Public properties

String?

A GUID identifying the current content, or null if unset.

Int

Mode used for data transmission.

CmcdConfiguration.RequestConfig!

Dynamic request specific configuration.

String?

A GUID identifying the current playback session, or null if unset.

Constants

CMCD_QUERY_PARAMETER_KEY

const val CMCD_QUERY_PARAMETER_KEY = "CMCD": String!

KEY_BITRATE

const val KEY_BITRATE = "br": String!

KEY_BUFFER_LENGTH

const val KEY_BUFFER_LENGTH = "bl": String!

KEY_BUFFER_STARVATION

const val KEY_BUFFER_STARVATION = "bs": String!

KEY_CMCD_OBJECT

const val KEY_CMCD_OBJECT = "CMCD-Object": String!

KEY_CMCD_REQUEST

const val KEY_CMCD_REQUEST = "CMCD-Request": String!

KEY_CMCD_SESSION

const val KEY_CMCD_SESSION = "CMCD-Session": String!

KEY_CMCD_STATUS

const val KEY_CMCD_STATUS = "CMCD-Status": String!

KEY_CONTENT_ID

const val KEY_CONTENT_ID = "cid": String!

KEY_DEADLINE

const val KEY_DEADLINE = "dl": String!

KEY_MAXIMUM_REQUESTED_BITRATE

const val KEY_MAXIMUM_REQUESTED_BITRATE = "rtp": String!

KEY_MEASURED_THROUGHPUT

const val KEY_MEASURED_THROUGHPUT = "mtp": String!

KEY_NEXT_OBJECT_REQUEST

const val KEY_NEXT_OBJECT_REQUEST = "nor": String!

KEY_NEXT_RANGE_REQUEST

const val KEY_NEXT_RANGE_REQUEST = "nrr": String!

KEY_OBJECT_DURATION

const val KEY_OBJECT_DURATION = "d": String!

KEY_OBJECT_TYPE

const val KEY_OBJECT_TYPE = "ot": String!

KEY_PLAYBACK_RATE

const val KEY_PLAYBACK_RATE = "pr": String!

KEY_SESSION_ID

const val KEY_SESSION_ID = "sid": String!

KEY_STARTUP

const val KEY_STARTUP = "su": String!

KEY_STREAMING_FORMAT

const val KEY_STREAMING_FORMAT = "sf": String!

KEY_STREAM_TYPE

const val KEY_STREAM_TYPE = "st": String!

KEY_TOP_BITRATE

const val KEY_TOP_BITRATE = "tb": String!

KEY_VERSION

const val KEY_VERSION = "v": String!

MAX_ID_LENGTH

const val MAX_ID_LENGTH = 64: Int

Maximum length for ID fields.

MODE_QUERY_PARAMETER

const val MODE_QUERY_PARAMETER = 1: Int

MODE_REQUEST_HEADER

const val MODE_REQUEST_HEADER = 0: Int

Public constructors

CmcdConfiguration

CmcdConfiguration(
    sessionId: String?,
    contentId: String?,
    requestConfig: CmcdConfiguration.RequestConfig!
)

Creates an instance with dataTransmissionMode set to MODE_REQUEST_HEADER.

CmcdConfiguration

CmcdConfiguration(
    sessionId: String?,
    contentId: String?,
    requestConfig: CmcdConfiguration.RequestConfig!,
    @CmcdConfiguration.DataTransmissionMode dataTransmissionMode: Int
)

Creates an instance.

Public functions

isBitrateLoggingAllowed

fun isBitrateLoggingAllowed(): Boolean

Returns whether logging bitrate is allowed based on the request configuration.

isBufferLengthLoggingAllowed

fun isBufferLengthLoggingAllowed(): Boolean

Returns whether logging buffer length is allowed based on the request configuration.

isBufferStarvationLoggingAllowed

fun isBufferStarvationLoggingAllowed(): Boolean

Returns whether logging buffer starvation is allowed based on the request configuration.

isContentIdLoggingAllowed

fun isContentIdLoggingAllowed(): Boolean

Returns whether logging content ID is allowed based on the request configuration.

isDeadlineLoggingAllowed

fun isDeadlineLoggingAllowed(): Boolean

Returns whether logging deadline is allowed based on the request configuration.

isMaximumRequestThroughputLoggingAllowed

fun isMaximumRequestThroughputLoggingAllowed(): Boolean

Returns whether logging maximum requested throughput is allowed based on the request configuration.

isMeasuredThroughputLoggingAllowed

fun isMeasuredThroughputLoggingAllowed(): Boolean

Returns whether logging measured throughput is allowed based on the request configuration.

isNextObjectRequestLoggingAllowed

fun isNextObjectRequestLoggingAllowed(): Boolean

Returns whether logging next object request is allowed based on the request configuration.

isNextRangeRequestLoggingAllowed

fun isNextRangeRequestLoggingAllowed(): Boolean

Returns whether logging next range request is allowed based on the request configuration.

isObjectDurationLoggingAllowed

fun isObjectDurationLoggingAllowed(): Boolean

Returns whether logging object duration is allowed based on the request configuration.

isObjectTypeLoggingAllowed

fun isObjectTypeLoggingAllowed(): Boolean

Returns whether logging object type is allowed based on the request configuration.

isPlaybackRateLoggingAllowed

fun isPlaybackRateLoggingAllowed(): Boolean

Returns whether logging playback rate is allowed based on the request configuration.

isSessionIdLoggingAllowed

fun isSessionIdLoggingAllowed(): Boolean

Returns whether logging session ID is allowed based on the request configuration.

isStartupLoggingAllowed

fun isStartupLoggingAllowed(): Boolean

Returns whether logging startup is allowed based on the request configuration.

isStreamTypeLoggingAllowed

fun isStreamTypeLoggingAllowed(): Boolean

Returns whether logging stream type is allowed based on the request configuration.

isStreamingFormatLoggingAllowed

fun isStreamingFormatLoggingAllowed(): Boolean

Returns whether logging streaming format is allowed based on the request configuration.

isTopBitrateLoggingAllowed

fun isTopBitrateLoggingAllowed(): Boolean

Returns whether logging top bitrate is allowed based on the request configuration.

Public properties

contentId

val contentIdString?

A GUID identifying the current content, or null if unset.

This value is consistent across multiple different sessions and devices and is defined and updated at the discretion of the service provider. Maximum length is 64 characters.

dataTransmissionMode

@CmcdConfiguration.DataTransmissionMode
val dataTransmissionModeInt

Mode used for data transmission.

requestConfig

val requestConfigCmcdConfiguration.RequestConfig!

Dynamic request specific configuration.

sessionId

val sessionIdString?

A GUID identifying the current playback session, or null if unset.

A playback session typically ties together segments belonging to a single media asset. Maximum length is 64 characters.