We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
videojs-contrib-eme enables us to add custom getLicense function How to achieve the same using videojs-contrib-dash?
This is my getLicense function:
public async getKeySystems(licenseHeaders, sourceUrl) { return { "com.widevine.alpha": { supportedConfigurations: [{ audioCapabilities: [{ initDataTypes: ["cenc"], sessionTypes: ["temporary"], contentType: "audio/mp4; codecs=\"opus\"", robustness: "SW_SECURE_CRYPTO" }] }], async getLicense(_emeOptions: Object, keyMessage: ArrayBuffer, callback: ICallBackType) { let startTime = window.performance.now(); videojs.xhr( { uri: licenseServerUrl, method: HTTP_METHOD_POST, responseType: "arraybuffer", body: JSON.stringify({ licenseChallenge: btoa(convertArrayBufferToString(keyMessage)), }), headers: licenseHeaders, }, (err, response, responseBody) => { if (err || !response || response.statusCode < 200 || response.statusCode >= 300) { LOG.error(`error`); if (err) { callback(err); } return; } LOG.info("License fetched successfully"); const drmProxyResponse = JSON.parse( convertArrayBufferToString(responseBody) ); let key = convertStringToArrayBuffer(atob(drmProxyResponse.license)); callback(null, key); } ); }, }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
videojs-contrib-eme enables us to add custom getLicense function
How to achieve the same using videojs-contrib-dash?
This is my getLicense function:
The text was updated successfully, but these errors were encountered: