CmcdConfiguration Class

public class CmcdConfiguration : NSObject, NSCopying, Codable

The CMCD Configuration

Lifecycle

  • Creates an empty CMCD configuration initialized with SDK defaults.

    Declaration

    Swift

    public override init()
  • Creates a CMCD configuration with explicit values.

    Declaration

    Swift

    public init(
        sendCMCDAsQueryParameters: Bool = false,
        sessionId: String = UUID().uuidString,
        contentId: String = UUID().uuidString
    )

    Parameters

    sendCMCDAsQueryParameters

    Enables CMCD query-parameter mode.

    sessionId

    CMCD session identifier (sid).

    contentId

    CMCD content identifier (cid).

Public

  • Indicates whether to enable attaching Common Media Client Data as HTTP request query parameters.

    Remark

    Default value is false.

    Remark

    NOT applicable to native HLS player

    Declaration

    Swift

    @objc
    public var sendCMCDAsQueryParameters: Bool
  • A GUID identifying the current playback session. A playback session typically ties together segments belonging to a single media asset. Maximum length is 64 characters. It is RECOMMENDED to conform to the UUID specification

    Header-Key: sid Type: String

    Remark

    NOT applicable to native HLS player

    Declaration

    Swift

    @objc
    public var sessionId: String
  • A unique string identifying the current content. Maximum length is 64 characters. This value is consistent across multiple different sessions and devices and is defined and updated at the discretion of the service provider.

    Header-Key: cid Type: String

    Remark

    NOT applicable to native HLS player

    Declaration

    Swift

    @objc
    public var contentId: String