diff --git a/README.md b/README.md index 062ff1e..e0f17c7 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ + Works with any service that accepts challenges from Android devices on the same endpoint. + Incompatible services: + Netflix (unless a browser/PC device is provided, which is rare) + + VdoCipher (ditto) + Some services may detect your browser and interfere with PlayReady playback. Try using a user-agent changer extension, or use a Chromium-based browser for PlayReady playback. + Firefox-based browsers may fail to play some PlayReady-protected video, with an internal error saying `ChromiumCDMParent::RecvDecodeFailed with status decode error`. This is a problem with the browser's ClearKey handler, and Vineless can do nothing about it. Please use a Chromium-based browser if this error occurs. + Incompatible extensions: diff --git a/lib/remote_cdm.js b/lib/remote_cdm.js index 163e5c3..38d9cc9 100644 --- a/lib/remote_cdm.js +++ b/lib/remote_cdm.js @@ -114,7 +114,11 @@ export class RemoteCdm { this.secret = dataObj.secret; for (const [key, value] of Object.entries(this.baseHeaders)) { if (value === "{secret}") { - this.baseHeaders[key] = this.secret; + if (this.secret) { + this.baseHeaders[key] = this.secret; + } else { + delete this.baseHeaders[key]; + } } } } @@ -180,6 +184,9 @@ export class RemoteCdm { } if (request.sessionIdResKeyName) { this.sessionId = getNestedProperty(jsonData, request.sessionIdResKeyName); + if (!this.sessionId) { + throw new Error("Server did not return a session ID"); + } } if (request.challengeKeyName) { this.challenge = getNestedProperty(jsonData, request.challengeKeyName); @@ -259,6 +266,9 @@ export class RemoteCdm { } if (request.sessionIdResKeyName) { this.sessionId = getNestedProperty(jsonData, request.sessionIdResKeyName); + if (!this.sessionId) { + throw new Error("Server did not return a session ID"); + } } if (request.contentKeysKeyName) { this.contentKeys = getNestedProperty(jsonData, request.contentKeysKeyName); diff --git a/panel/panel.js b/panel/panel.js index 4173f5e..291f2bc 100644 --- a/panel/panel.js +++ b/panel/panel.js @@ -299,6 +299,8 @@ async function appendLog(result) { const logContainer = document.createElement('div'); logContainer.classList.add('log-container'); + const pssh = result.pssh_data || result.wrm_header; + logContainer.innerHTML = `