Class CmcdHeadersFactory


  • @Deprecated
    public final class CmcdHeadersFactory
    extends Object
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    This class serves as a factory for generating Common Media Client Data (CMCD) HTTP request headers in 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.

    • Field Detail

      • STREAMING_FORMAT_DASH

        public static final String STREAMING_FORMAT_DASH
        Deprecated.
        Represents the Dynamic Adaptive Streaming over HTTP (DASH) format.
        See Also:
        Constant Field Values
      • STREAMING_FORMAT_HLS

        public static final String STREAMING_FORMAT_HLS
        Deprecated.
        Represents the HTTP Live Streaming (HLS) format.
        See Also:
        Constant Field Values
      • STREAMING_FORMAT_SS

        public static final String STREAMING_FORMAT_SS
        Deprecated.
        Represents the Smooth Streaming (SS) format.
        See Also:
        Constant Field Values
      • STREAM_TYPE_VOD

        public static final String STREAM_TYPE_VOD
        Deprecated.
        Represents the Video on Demand (VOD) stream type.
        See Also:
        Constant Field Values
      • STREAM_TYPE_LIVE

        public static final String STREAM_TYPE_LIVE
        Deprecated.
        Represents the Live Streaming stream type.
        See Also:
        Constant Field Values
      • OBJECT_TYPE_INIT_SEGMENT

        public static final String OBJECT_TYPE_INIT_SEGMENT
        Deprecated.
        Represents the object type for an initialization segment in a media container.
        See Also:
        Constant Field Values
      • OBJECT_TYPE_AUDIO_ONLY

        public static final String OBJECT_TYPE_AUDIO_ONLY
        Deprecated.
        Represents the object type for audio-only content in a media container.
        See Also:
        Constant Field Values
      • OBJECT_TYPE_VIDEO_ONLY

        public static final String OBJECT_TYPE_VIDEO_ONLY
        Deprecated.
        Represents the object type for video-only content in a media container.
        See Also:
        Constant Field Values
      • OBJECT_TYPE_MUXED_AUDIO_AND_VIDEO

        public static final String OBJECT_TYPE_MUXED_AUDIO_AND_VIDEO
        Deprecated.
        Represents the object type for muxed audio and video content in a media container.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CmcdHeadersFactory

        public CmcdHeadersFactory​(CmcdConfiguration cmcdConfiguration,
                                  ExoTrackSelection trackSelection,
                                  long bufferedDurationUs,
                                  @StreamingFormat String streamingFormat,
                                  boolean isLive)
        Deprecated.
        Creates an instance.
        Parameters:
        cmcdConfiguration - The CmcdConfiguration for this chunk source.
        trackSelection - The track selection.
        bufferedDurationUs - The duration of media currently buffered from the current playback position, in microseconds.
        streamingFormat - The streaming format of the media content. Must be one of the allowed streaming formats specified by the CmcdHeadersFactory.StreamingFormat annotation.
        isLive - true if the media content is being streamed live, false otherwise.
        Throws:
        IllegalArgumentException - If bufferedDurationUs is negative.