In this migration guide, we describe the changes in the API between 7.27 and 7.28.

Full Screen API

In the new version, the Fullscreen API is extended and extracted into a dedicated service.

Dedicated FullScreen Service

v7.27

browser.on(FullScreenEntered.class, event -> {
    Browser browser = event.browser();
});

browser.on(FullScreenExited.class, event -> {
    Browser browser = event.browser();
});

v7.28

FullScreen fullScreen = browser.fullScreen();
fullScreen.on(FullScreenEntered.class, event -> {
    FullScreen fullScreen = event.fullScreen();
    Browser browser = fullScreen.browser();
});

fullScreen.on(FullScreenExited.class, event -> {
    FullScreen fullScreen = event.fullScreen();
    Browser browser = fullScreen.browser();
});

Exiting Fullscreen Mode

In JxBrowser 7.28, it’s now possible to exit the fullscreen mode.

browser.fullScreen().exit();
Go Top