pssh-tools
Advanced tools
Comparing version
@@ -290,10 +290,9 @@ const path = require('path') | ||
const dataBuffer = Buffer.from(data, 'base64') | ||
switch (targetSystem.name) { | ||
case system.WIDEVINE.name: | ||
return decodeWVData(dataBuffer) | ||
case system.PLAYREADY.data: | ||
return decodePRData(dataBuffer) | ||
default: | ||
return null | ||
if (system.WIDEVINE.name === targetSystem) { | ||
return decodeWVData(dataBuffer) | ||
} | ||
if (system.PLAYREADY.name === targetSystem) { | ||
return decodePRData(dataBuffer) | ||
} | ||
return null | ||
} | ||
@@ -300,0 +299,0 @@ |
{ | ||
"name": "pssh-tools", | ||
"version": "0.1.0-alpha1", | ||
"version": "0.1.0-alpha2", | ||
"description": "Tools to generate PSSH Data and PSSH Box", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -65,4 +65,4 @@ const test = require('ava') | ||
test('Should be able to decode PlayReady PSSH data', t => { | ||
const result = pssh.tools.decodePsshData(pssh.tools.system.PLAYREADY.name, PSSH_DATA_PR) | ||
console.log(result.recordXml) | ||
const result = pssh.playready.decodeData(PSSH_DATA_PR) | ||
console.log('PR Data:', result.recordXml) | ||
@@ -69,0 +69,0 @@ t.not(result.length, 0) |
24310
-0.16%548
-0.18%