samsungdforum / playeravplaydrm Goto Github PK
View Code? Open in Web Editor NEWPlayerAVplayDRM sample application to play Playready, Widevine DRM contents.
License: Other
PlayerAVplayDRM sample application to play Playready, Widevine DRM contents.
License: Other
New to Tizen and writing apps for TV. Trying to learn how to work with a DRM's. Do I need to go through getting to be a partner to use this sample?
Thanks,
Greg
Hi!
We are having some issues with the integration of Widevine Modular DRM using avplay.
Followed the example from this page: DRM Contents Playback Sequence, but even with the testing streams from Shaka demo samples we are getting "Invalid license challenge" 500 errors from the license servers. Same content works with Shaka player. There is some difference in how EME in the browser constructs the Challenge body and how avplay does it in "ondrmevent" callback, but it's hard to understand since it's base64 encoded (even after decoding it's still not readable).
Please provide working updated example of Widevine Modular integration.
Sample Dash Manifest URL: https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine/dash.mpd
Sample Widevine License URL: https://cwip-shaka-proxy.appspot.com/no_auth
No custom headers needed, everything works with Shaka on this combination.
Brief example of how we do it in the code:
// Before prepareAsync
drmParam.AppSession = uniqueId(); // random number
drmParam.DataType = 'MPEG-DASH';
if (parseInt(platformVersion, 10) >= 5) { // const {platformVersion} = tizen.systeminfo.getCapabilities();
const STRINGIFIED_PARAMS = JSON.stringify(drmParam);
webapis.avplay.setDrm(DRM_WIDEVINE, 'SetProperties', STRINGIFIED_PARAMS);
} else {
webapis.avplay.setDrm(DRM_WIDEVINE, 'Initialize', '');
webapis.avplay.setDrm(DRM_WIDEVINE, 'widevine_app_session', drmParam.AppSession);
webapis.avplay.setDrm(DRM_WIDEVINE, 'widevine_data_type', drmParam.DataType);
}
// inside ondrmevent callback
const decodedMessage = atob(drmData.challenge);
const drmChallengeRequest = new XMLHttpRequest();
drmChallengeRequest.responseType = 'arraybuffer';
drmChallengeRequest.open('POST', this.licenseUrl, true);
drmChallengeRequest.onload = function() {
if (this.status === 200 && this.response) {
const licenseParam = `${drmData.session_id}PARAM_START_POSITION${btoa(this.response)}PARAM_START_POSITION`;
webapis.avplay.setDrm(DRM_WIDEVINE, 'widevine_license_data', licenseParam);
} else {
console.log('Error in license request');
}
};
drmChallengeRequest.send(decodedMessage);
Here is the Diff of how Shaka player constructs license challenge request body, and how Tizen native player does that. First of all Tizen player doesn't detect TV model properly, and then there is a difference at the bottom of the request, but since it's unique at each request and encoded, it's impossible to understand which part of it is incorrect:
https://www.diffchecker.com/h8CZ5Y3X
how to implement verimatrix drm ?
I use these code:
var url = 'https://s3-us-west-1.amazonaws.com/integration-support/public_content/content_a/content_a.m3u8';
var host = 'ott-integration-1.verimatrix.com';
webapis.avplay.open(url);
var drmParam = new Object();
drmParam.CompanyName = CompanyName;
drmParam.IPTV = '';
drmParam.Web = host; //HOST IP
webapis.avplay.setDrm('VERIMATRIX', 'Initialize', JSON.stringify(drmParam));
webapis.avplay.prepareAsync(function(){webapis.avplay.play();});
and I got an error, drmEvent = "VERIMATRIX", drmData = Object {code: "4", message: "Createhandle/getrights/drmwebset/parserurl error", name: "DrmError"}
what does this error mean? how to modify my code to support verimatrix drm?
This repo is refered by this page
http://www.samsungdforum.com/TizenSampleGuide/tizen4611/index.html
Where we can find the verimatrix example?
Thx in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.