playready - HTML5 player not working on chrome -
i'm new stackoverflow , first question. html5 player works fine on internet explorer doesn't work on google chrome. i'm using playready stream encrypted cenc. how can let work on chrome? don't have access servers, they're run third parties.
thanks
technically possible support widevine while you're stream playready. possible since use cenc. since don't have access servers mentioned can use technique called pssh forging. replaces pieces make chrome think it's widevine, since it's cenc cdm decrypt video , stream play.
for sake of ease i'm going assume use dash.
we have here pssh box:
const widevinepssh = '0000005c7073736800000000edef8ba979d64acea3c827dcd51d21ed0000003c080112101c773709e5ab359cbed9512bc27755fa1a087573702d63656e63221848486333436557724e5a792b32564572776e64562b673d3d2a003200';
you need replace 1c773709e5ab359cbed9512bc27755fa
kid.
and @ part insert you'r segment in sourcebuffer (before appendsegment) can following:
let segment = args[0]; segment = new uint8array(segment); const newpssh = widevinepssh.replace('1c773709e5ab359cbed9512bc27755fa', psshkid); const subarray = new uint8array(drmutils.stringtoarraybuffer('70737368')); let index = 0; const found = subarray.every((item) => { const masterindex = segment.indexof(item, index); if (~masterindex) { index = masterindex; return true; } }); if (found) { return originalsourcebufferappendbuffer.apply(this, [].slice.call(args)); } segment = drmutils.uint8arraytohex(segment); // inject forged signal // 70737368 = pssh segment = segment.substr(0, segment.lastindexof('70737368') - 8) + newpssh + segment.substr(segment.lastindexof('70737368') - 8); // fix moov atom length // 6d6f6f76 = moov const header = segment.substr(0, segment.indexof('6d6f6f76') - 8); const payload = segment.substr(segment.indexof('6d6f6f76') - 8); const newlength = math.floor(payload.length / 2); segment = header + drmutils.inttohex(newlength, 8) + payload.substr(8); segment = decode(segment).b;
sadly can share bits , pieces should working.
Comments
Post a Comment