Skip to content

alloy: Add component updater support for Widevine #3149

@magreenblatt

Description

@magreenblatt

Original report by me.


Applications using the Alloy runtime must currently download Widevine binaries from a Google CDN and register them using the CefRegisterWidevineCdm function as documented here. Chrome, on the other hand, uses the component updater to update the binaries at runtime when necessary.

Manual download and registration of Widevine with the Alloy runtime has proven problematic for the following reasons:

  1. CEF code must be kept in sync with Chrome code, which is an error-prone process (see issue widevine: Breaking manifest change (VP9 version string) with v4.10.2209.0 #3138 as a recent example).
  2. Communications from the Widevine team must be carefully monitored to know what CDM version to download for a particular platform and Chromium version combination.
  3. Failure by the client to download and register the correct CDM version will cause playback errors.
  4. The Chrome runtime currently uses the component updater (same code as Chrome), and we don’t want to require separate approaches for the Chrome and Alloy runtimes.

The original Widevine implementation in CEF used the component updater (see issue #1631). That implementation was subsequently replaced by the CefRegisterWidevineCdm approach currently in use (see issue #2009). The stated reasons for dropping component updater support at that time (mid-2016) were:

  1. There may be a delay of arbitrary length before the CDM binaries are downloaded;
  2. The remote service controls the specific CDM version that is downloaded;
  3. The downloaded CDM version may not work with the Chromium version in use by the client application -- the newest available CDM version is always downloaded and Google only tests that CDM version with the current Google Chrome stable version.

Recent communications with Google (mid-2021) provide the following responses:

  • Re # 1: “The CDM is normally bundled with a new Chrome installation process. On upgrade, the CDM component will auto-download after X time, I believe the default is either 600s or 900s. If the user attempts DRM playback before the CDM exists, there will be a delay until the CDM retrieval is dynamically executed and completed.”
  • Re # 2: “We have cleaned up the CDM rollout process to be more stable. The CDM rollout process/schedule looks like this:
    [T0] Available on Chrome beta channel for upcoming Chrome release
    [T1] Available on Chrome stable channel (and Component Updater) for current Chrome release (this means CDM is available on latest Chrome, not previous Chrome releases yet)
    [T1 + 2 weeks] CDM is available via Component Updater for all compatible Chrome releases (right now, it's M68 or later)
    [T1 + 2 weeks] Direct HTTP download links are updated and current.txt is updated with latest CDM version”
  • Re # 3: “Minimal testing is conducted on previous versions of Chrome - usually 1-2 versions back but this is not always guaranteed. We expect the CDM to work as long as the CDM interface is unchanged (currently at 10), which goes back as far as M68.”

Based on the above, we have decided to restore component updater usage with the Alloy runtime. The existing CefRegisterWidevineCdm approach will be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrameworkRelated to framework code or APIsalloyRelated to the Alloy runtimeenhancementEnhancement request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions