CMCDController
Controller to deal with Common Media Client Data (CMCD)
Static Method Summary
| Static Public Methods | ||
| public static | appendQueryToUri(uri: undefined, query: undefined): string Append query args to a uri. | |
| public static | Serialize a CMCD data object according to the rules defined in the section 3.2 of CTA-5004. | |
| public static | toHeaders(data: CMCD): Partial Convert a CMCD data object to request headers according to the rules defined in the section 2.1 and 3.2 of CTA-5004. | |
| public static | Convert a CMCD data object to query args according to the rules defined in the section 2.2 and 3.2 of CTA-5004. | |
| public static | Generate a random v4 UUI | |
Constructor Summary
| Public Constructor | ||
| public |  | |
Member Summary
| Public Members | ||
| public | Apply CMCD data to a segment request | |
| public | Apply CMCD data to a manifest request. | |
| public | audioBuffer: SourceBuffer | |
| public |  | |
| public |  | |
| public | config: HlsConfig | |
| public |  | |
| public |  | |
| public | media: HTMLMediaElement | |
| public | onPlaying: * | |
| public | onWaiting: * | |
| public |  | |
| public |  | |
| public |  | |
| public | videoBuffer: SourceBuffer | |
Method Summary
| Public Methods | ||
| public | apply(context: LoaderContext, data: CMCD) Apply CMCD data to a request. | |
| public | createData(): CMCD Create baseline CMCD data | |
| public | createFragmentLoader(): * Create a playlist loader | |
| public | createPlaylistLoader(): * Create a playlist loader | |
| public | destroy() | |
| public | getBufferLength(type: CMCDObjectType): * Get the buffer length for a media type in milliseconds | |
| public | getObjectType(fragment: Fragment): * The CMCD object type. | |
| public | getTopBandwidth(type: CMCDObjectType): * Get the highest bitrate. | |
| public | onBufferCreated(event: undefined, data: BufferCreatedData) | |
| public | onMediaAttached(event: undefined, data: MediaAttachedData) | |
| public |  | |
| public |  | |
| public |  | |
Static Public Methods
public static appendQueryToUri(uri: undefined, query: undefined): string source
Append query args to a uri.
public static serialize(data: CMCD): string source
Serialize a CMCD data object according to the rules defined in the section 3.2 of CTA-5004.
Params:
| Name | Type | Attribute | Description | 
| data | CMCD | 
public static toHeaders(data: CMCD): Partial source
Convert a CMCD data object to request headers according to the rules defined in the section 2.1 and 3.2 of CTA-5004.
Params:
| Name | Type | Attribute | Description | 
| data | CMCD | 
Return:
| Partial | 
Public Constructors
public constructor() source
Public Members
public audioBuffer: SourceBuffer source
public config: HlsConfig source
public media: HTMLMediaElement source
public onPlaying: * source
public onWaiting: * source
public videoBuffer: SourceBuffer source
Public Methods
public apply(context: LoaderContext, data: CMCD) source
Apply CMCD data to a request.
Params:
| Name | Type | Attribute | Description | 
| context | LoaderContext | ||
| data | CMCD | 
public destroy() source
public getBufferLength(type: CMCDObjectType): * source
Get the buffer length for a media type in milliseconds
Params:
| Name | Type | Attribute | Description | 
| type | CMCDObjectType | 
Return:
| * | 
public getObjectType(fragment: Fragment): * source
The CMCD object type.
Params:
| Name | Type | Attribute | Description | 
| fragment | Fragment | 
Return:
| * | 
public getTopBandwidth(type: CMCDObjectType): * source
Get the highest bitrate.
Params:
| Name | Type | Attribute | Description | 
| type | CMCDObjectType | 
Return:
| * | 
public onBufferCreated(event: undefined, data: BufferCreatedData) source
Params:
| Name | Type | Attribute | Description | 
| event | undefined | ||
| data | BufferCreatedData | 
public onMediaAttached(event: undefined, data: MediaAttachedData) source
Params:
| Name | Type | Attribute | Description | 
| event | undefined | ||
| data | MediaAttachedData | 
 
    
  