widevine - v0.1.6
    Preparing search index...

    widevine - v0.1.6

    widevine logo

    @li0ard/widevine
    Simple Widevine CDM implementation
    docs



    Caution

    • Project doesn't provide private key and Client ID for any purposes
    • Project doesn't condone piracy or any action against the terms of the DRM systems
    • Project is for study and research only. Please don't use it for commercial purposes
    • Support privacy mode with Service certificates
    • Support .wvd deserialization
    • Strictly typed API
    npm i @li0ard/widevine
    
    import { CDM, PSSH, Device, DeviceType, KeyType } from "@li0ard/widevine";

    const device = Device.decode(
    DeviceType.ANDROID,
    Buffer.from("....", "base64"),
    Buffer.from("....", "base64")
    ) // Device.fromWvd(....);

    const cdm = new CDM(device);
    const sessionId = cdm.open();

    const pssh = PSSH.decode(Buffer.from("....", "base64"));

    const challenge = cdm.getLicenseChallenge(sessionId, pssh);
    const license = await (await fetch(`https://cwip-shaka-proxy.appspot.com/no_auth`, {
    method: "POST",
    body: challenge
    })).arrayBuffer();

    for(const key of cdm.parseLicense(sessionId, new Uint8Array(license)))
    console.log(`- [${KeyType[key.type]}] ${bytesToHex(key.kid)}:${bytesToHex(key.key)}`);

    cdm.close(sessionId);
    • Widevine - Widevine (and Widevine icon) by Google
    • pywidevine - An Open Source Python Implementation of Widevine CDM (greatly inspired)