Beta
Extracts the content ID from the license server URL or InitData.
The license server URL
The initialization data (PSSH box)
The query parameter key to extract (default: 'ContentId')
The extracted content ID as a string or null if not found
const laUrl = 'https://common-media-library.com';const initData = stringToUint16('\tskd://common-media-library.com/asset1234');strictEqual(getId(laUrl, initData), 'common-media-library.com/asset1234'); Copy
const laUrl = 'https://common-media-library.com';const initData = stringToUint16('\tskd://common-media-library.com/asset1234');strictEqual(getId(laUrl, initData), 'common-media-library.com/asset1234');
Extracts the content ID from the license server URL or InitData.