New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pssh-tools

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pssh-tools - npm Package Compare versions

Comparing version

to
0.1.0-alpha2

13

lib/pssh/tools.js

@@ -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)