@svta/common-media-library
    Preparing search index...

    Function getPsshForKeySystem

    • Beta

      Returns the PSSH box associated with the given key system from the concatenated list of PSSH boxes in the provided initData.

      Parameters

      • uuid: string

        The desired key system UUID

      • initData: ArrayBuffer

        'cenc' initialization data. Concatenated list of PSSH boxes.

      Returns null | ArrayBuffer

      The PSSH box ArrayBuffer corresponding to the given key system, or null if not found.

      const initData = new Uint8Array(samplePsshBox).buffer;
      const result = getPsshForKeySystem(uuid, initData);