streaming!!, oh and file names, linting ig..

This commit is contained in:
Reid 2025-08-15 01:40:21 -07:00
parent 7b15834f17
commit f2800f13c8
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
23 changed files with 1195 additions and 254 deletions

View file

@ -15,7 +15,7 @@ export async function getWidevineDecryptionKey(psshDataUri: string, trackId: str
let challenge: Buffer;
try {
challenge = session.createLicenseRequest();
} catch (err) {
} catch (_err) {
// for some reason, if gotten from a webplayback manifest, the pssh is in a completely different format
// well, somewhat. it's just the raw data, we have to rebuild the pssh
const rebuiltPssh = psshTools.widevine.encodePssh({
@ -24,6 +24,9 @@ export async function getWidevineDecryptionKey(psshDataUri: string, trackId: str
keyIds: [Buffer.from(dataUriToBuffer(psshDataUri).buffer).toString("hex")]
});
// i'd love to log the error but it feels weird doing that and spammy
// also its the most useless error ever. "the pssh is not an actuall pssh"
// that typo is intentional, the library is like that
log.warn("pssh was invalid, treating it as raw data (this is expected in the webplayback manifest)");
log.warn("this should not throw an error, unless the pssh data is actually invalid");