Cefrium View
Idiomatic Compose view backed by a full Chromium engine (Cefrium).
State-hoisting API: observe through CefriumViewState, drive navigation through CefriumNavigator. The browser's lifecycle belongs to state, not to this composable — so detaching this view (e.g. switching tabs) does NOT close the browser; the page stays alive. Release it via CefriumViewState.close (automatic for rememberCefriumViewState).
For the lower-level callback-based API see CefriumWebView.
val state = rememberCefriumViewState("https://example.com")
val navigator = rememberCefriumNavigator()
CefriumView(state, Modifier.fillMaxSize(), navigator)Parameters
Hoisted state holder that owns the browser.
Modifier for the browser view.
Navigation controller bound to this state.
Handles window.cefriumQuery calls from page JavaScript. Return true and resolve via the callback (sync or async). Omit to keep the JS bridge disabled for this view (queries then fail with -1).
Escape hatch to the underlying CefriumBrowser for features not yet on the navigator (find in page, downloads, dark mode).
How inline media reacts to the host lifecycle. Default BackgroundMediaPolicy.PAUSE_ON_STOP stops a playing video/audio when the host is backgrounded and resumes on return -- zero work for the consumer. Set BackgroundMediaPolicy.NONE to keep playing (background audio), or pass onHostLifecycle for full control.
If non-null, OVERRIDES backgroundMediaPolicy: called on every host lifecycle event with the CefriumBrowser, so the host can implement any custom media/visibility policy (mute, pause, stop, nothing).