pssh-tools
Advanced tools
Comparing version 1.0.7 to 1.0.8-alpha1
@@ -59,3 +59,3 @@ "use strict"; | ||
const constructProXML4 = (keyPair, licenseUrl, keySeed) => { | ||
let key = keySeed && keySeed.length ? generateContentKey(keyPair.key, keySeed) : exports.encodeKey(keyPair, keySeed); | ||
let key = exports.encodeKey(keyPair, keySeed); | ||
let xmlArray = ['<WRMHEADER xmlns="http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader" version="4.0.0.0">']; | ||
@@ -77,3 +77,3 @@ xmlArray.push('<DATA>'); | ||
let keyIds = keyPairs.map((k) => { | ||
return keySeed && keySeed.length ? generateContentKey(k.kid, keySeed) : exports.encodeKey(k, keySeed); | ||
return exports.encodeKey(k, keySeed); | ||
}); | ||
@@ -80,0 +80,0 @@ let xmlArray = ['<?xml version="1.0" encoding="UTF-8"?>']; |
@@ -1,2 +0,2 @@ | ||
import { HeaderConfig, PlayReadyData, WidevineData, DecodeResult } from '../types'; | ||
import * as T from '../types'; | ||
export declare const system: { | ||
@@ -20,4 +20,4 @@ WIDEVINE: { | ||
}; | ||
export declare const getPsshHeader: (request: HeaderConfig) => string; | ||
export declare const decodePssh: (data: string) => DecodeResult; | ||
export declare const decodePsshData: (targetSystem: string, data: string) => PlayReadyData | WidevineData | null; | ||
export declare const getPsshHeader: (request: T.HeaderConfig) => string; | ||
export declare const decodePssh: (data: string) => T.DecodeResult; | ||
export declare const decodePsshData: (targetSystem: string, data: string) => T.PlayReadyData | T.WidevineData | null; |
@@ -25,3 +25,3 @@ "use strict"; | ||
const createPsshHeader = (version) => { | ||
let psshHeaderBuffer = Buffer.from([0x70, 0x73, 0x73, 0x68]); | ||
let psshHeaderBuffer = Buffer.from('pssh'); | ||
let versionBuffer = Buffer.alloc(2); | ||
@@ -28,0 +28,0 @@ versionBuffer.writeInt16LE(version, 0); |
{ | ||
"name": "pssh-tools", | ||
"version": "1.0.7", | ||
"version": "1.0.8-alpha1", | ||
"description": "Tools to generate PSSH Data and PSSH Box", | ||
@@ -8,6 +8,6 @@ "main": "dist/src/index.js", | ||
"scripts": { | ||
"prepare": "tsc -p .", | ||
"build": "tsc -p .", | ||
"pretest": "tslint -p .", | ||
"test": "tsc -p . && cp -R ./src/lib/pssh/proto ./dist/src/lib/pssh/ && ava ./dist/test/*.js --verbose" | ||
"build": "tslint -p . && tsc -p . && cp -R ./src/lib/pssh/proto ./dist/src/lib/pssh/", | ||
"prepare": "npm run build", | ||
"pretest": "npm run build", | ||
"test": "nyc ava" | ||
}, | ||
@@ -28,3 +28,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^0.1.3", | ||
"ava": "^2.1.0", | ||
"editorconfig": "^0.15.3", | ||
"nyc": "^14.1.1", | ||
"ts-node": "^8.3.0", | ||
@@ -44,6 +47,15 @@ "tslint": "^5.18.0", | ||
], | ||
"files": [ | ||
"test/**/*" | ||
], | ||
"require": [ | ||
"ts-node/register" | ||
] | ||
}, | ||
"nyc": { | ||
"reporter": [ "lcov", "text" ], | ||
"extends": "@istanbuljs/nyc-config-typescript", | ||
"all": true, | ||
"check-coverage": true | ||
} | ||
} |
# pssh-tools | ||
[![Build Status](https://travis-ci.org/feedsbrain/pssh-tools.svg?branch=master)](https://travis-ci.org/feedsbrain/pssh-tools) | ||
[![Build Status](https://travis-ci.org/feedsbrain/pssh-tools.svg?branch=master)](https://travis-ci.org/feedsbrain/pssh-tools) [![Maintainability](https://api.codeclimate.com/v1/badges/916d04bffb3000cbda7d/maintainability)](https://codeclimate.com/github/feedsbrain/pssh-tools/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/916d04bffb3000cbda7d/test_coverage)](https://codeclimate.com/github/feedsbrain/pssh-tools/test_coverage) | ||
@@ -19,2 +19,2 @@ **Tools to generate PSSH Data and PSSH Box** | ||
Currently we're only focus on Widevine and PlayReady but we will support more in the future. | ||
Currently we're only focus on Widevine and PlayReady but we will support more in the future. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47969
20
8
2