From 7.27 to 7.28
Fullscreen 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();
});
browser.on(FullScreenEntered::class.java) { event ->
val browser: Browser = event.browser()
}
browser.on(FullScreenExited::class.java) { event ->
val 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();
});
val fullScreen: FullScreen = browser.fullScreen()
fullScreen.on(FullScreenEntered::class.java) { event ->
val fullScreen = event.fullScreen()
val browser = fullScreen.browser()
}
fullScreen.on(FullScreenExited::class.java) { event ->
val fullScreen: FullScreen = event.fullScreen()
val browser = fullScreen.browser()
}
Exiting fullscreen mode
In JxBrowser 7.28, it’s now possible to exit the fullscreen mode.
browser.fullScreen().exit();
browser.fullScreen().exit()