From 8.8.0 to 8.9.0
In JxBrowser 8.8.0, we introduced Widevine support on Linux and removed it from the proprietary features enum.
8.8.0 and earlier
Previously, to use Widevine, you needed to specify the corresponding feature when creating the Engine
, and
the Engine
would automatically activate the service.
var engine = Engine.newInstance(
EngineOptions.newBuilder(renderingMode)
.enableProprietaryFeature(ProprietaryFeature.WIDEVINE)
.build());
8.9.0 and newer
Starting with JxBrowser 8.9.0, you need to activate Widevine manually.
macOS and Windows:
var status = engine.widevine().activate().join();
Linux:
// Create engine with the custom user data directory.
var options = EngineOptions
.newBuilder(HARDWARE_ACCELERATED)
.userDataDir(Paths.get("path/to/user/data/dir"))
.build();
var engine = Engine.newInstance(options);
// Activate Widevine.
var status = engine.widevine().activate().join();
if (status == WidevineActivationStatus.RESTART_REQUIRED) {
// And restart the engine if required.
engine.close();
engine = Engine.newInstance(options);
engine.widevine().activate().join();
}