public interface

CmcdConfiguration.Factory

 androidx.media3.exoplayer.upstream.CmcdConfiguration.Factory

Overview

Factory for CmcdConfiguration instances.

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

Summary

Fields
public static final CmcdConfiguration.FactoryDEFAULT

The default factory implementation.

Methods
public CmcdConfigurationcreateCmcdConfiguration(MediaItem mediaItem)

Creates a CmcdConfiguration based on the provided MediaItem.

Fields

public static final CmcdConfiguration.Factory DEFAULT

The default factory implementation.

It creates a CmcdConfiguration by generating a random session ID and using the content ID from MediaItem.mediaId (or MediaItem.DEFAULT_MEDIA_ID if the media item does not have a MediaItem.mediaId defined).

It also utilises a default CmcdConfiguration.RequestConfig implementation that enables all available keys, provides empty custom data, and sets the maximum requested bitrate to C.RATE_UNSET_INT.

Methods

public CmcdConfiguration createCmcdConfiguration(MediaItem mediaItem)

Creates a CmcdConfiguration based on the provided MediaItem.

Parameters:

mediaItem: The MediaItem from which to create the CMCD configuration.

Returns:

A CmcdConfiguration instance.