Skip to content

Function: isCmcdResponseReceivedKey() ​

ts
function isCmcdResponseReceivedKey(key): key is "url" | "e" | "h" | (keyof CmcdRequest) | "cmsdd" | "cmsds" | "rc" | "smrt" | "ttfb" | "ttfbb" | "ttlb" | "cen" | "ts";

Defined in: isCmcdResponseReceivedKey.ts:18

Check if a key is a valid CMCD response key.

Parameters ​

key ​

string

The key to check.

Returns ​

key is "url" | "e" | "h" | (keyof CmcdRequest) | "cmsdd" | "cmsds" | "rc" | "smrt" | "ttfb" | "ttfbb" | "ttlb" | "cen" | "ts"

true if the key is a valid CMCD response key, false otherwise.

Example ​

ts
equal(isCmcdResponseReceivedKey('url'), true)
equal(isCmcdResponseReceivedKey('e'), false)

A Streaming Video Technology Alliance project.