Back to Exoplayer

CmcdConfiguration.RequestConfig (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/upstream/CmcdConfiguration.RequestConfig.html

latest3.7 KB
Original Source

Package com.google.android.exoplayer2.upstream

Interface CmcdConfiguration.RequestConfig


public static interfaceCmcdConfiguration.RequestConfig

Represents configuration which can vary on each request.

Implementations must not make assumptions about which thread called their methods; and must be thread-safe.

Method Summary

All Methods Instance Methods Default Methods | Modifier and Type | Method | Description | | --- | --- | --- | | default ImmutableMap<@HeaderKey String,​String> | getCustomData() | Retrieves the custom data associated with CMCD logging. | | default int | getRequestedMaximumThroughputKbps​(int throughputKbps) | Returns the maximum throughput requested in kbps, or C.RATE_UNSET_INT if the maximum throughput is unknown in which case the maximum throughput will not be logged upstream. | | default boolean | isKeyAllowed​(@CmcdKey String key) | Checks whether the specified key is allowed in CMCD logging. |

Method Detail

- 

isKeyAllowed

default boolean isKeyAllowed​([@CmcdKey](CmcdConfiguration.CmcdKey.html "annotation in com.google.android.exoplayer2.upstream")[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")key)

Checks whether the specified key is allowed in CMCD logging. By default, all keys are allowed. Parameters:key - The key to check.Returns:Whether the key is allowed.

- 

getCustomData

default[ImmutableMap](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableMap.html?is-external=true "class or interface in com.google.common.collect")<[@HeaderKey](CmcdConfiguration.HeaderKey.html "annotation in com.google.android.exoplayer2.upstream")[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang"),​[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> getCustomData()

Retrieves the custom data associated with CMCD logging.

By default, no custom data is provided.

The key should belong to the CmcdConfiguration.HeaderKey. The value should consist of key-value pairs separated by commas. If the value contains one of the keys defined in the CmcdConfiguration.CmcdKey list, then this key should not be allowed, otherwise the key could be included twice in the produced log.

Example:

  - CMCD-Request:customField1=25400 
  - CMCD-Object:customField2=3200,customField3=4004,customField4=v,customField5=6000 
  - CMCD-Status:customField6,customField7=15000 
  - CMCD-Session:customField8="6e2fb550-c457-11e9-bb97-0800200c9a66" 

Returns:An ImmutableMap containing the custom data.

- 

getRequestedMaximumThroughputKbps

default int getRequestedMaximumThroughputKbps​(int throughputKbps)

Returns the maximum throughput requested in kbps, or C.RATE_UNSET_INT if the maximum throughput is unknown in which case the maximum throughput will not be logged upstream. Parameters:throughputKbps - The throughput in kbps of the audio or video object being requested.Returns:The maximum throughput requested in kbps.