widevine: Use component updater with the Alloy runtime (fixes issue #3149)

Widevine CDM binaries will be downloaded on supported platforms shortly after
application startup. Widevine support will then become available within a few
seconds after successful installation on Windows or after the next application
restart on other platforms. The CDM files will be downloaded to a "WidevineCdm"
directory inside the `CefSettings.user_data_path` directory.

Pass the `--disable-component-update` command-line flag to disable Widevine
download and installation. Pass the `--component-updater=fast-update` command-
line flag to force Widevine download immediately after application startup.

See the related issue for additional usage details.
This commit is contained in:
Marshall Greenblatt
2021-08-09 17:18:43 -04:00
parent eaf581e544
commit 240b869db5
45 changed files with 201 additions and 1459 deletions

View File

@@ -7,7 +7,6 @@
#include <algorithm>
#include "include/cef_parser.h"
#include "include/cef_web_plugin.h"
#include "tests/shared/browser/client_app_browser.h"
#include "tests/shared/common/client_switches.h"
@@ -144,16 +143,6 @@ MainContextImpl::MainContextImpl(CefRefPtr<CefCommandLine> command_line,
if (!use_transparent_painting) {
browser_background_color_ = background_color_;
}
const std::string& cdm_path =
command_line_->GetSwitchValue(switches::kWidevineCdmPath);
if (!cdm_path.empty()) {
// Register the Widevine CDM at the specified path. See comments in
// cef_web_plugin.h for details. It's safe to call this method before
// CefInitialize(), and calling it before CefInitialize() is required on
// Linux.
CefRegisterWidevineCdm(cdm_path, nullptr);
}
}
MainContextImpl::~MainContextImpl() {