startSession

suspend fun startSession(types: Set<SourceType>? = null, multiple: Boolean? = null, cursorMode: CursorMode? = null, restoreToken: String? = null, persistMode: PersistMode? = null, parentWindow: String = ""): Result<StartResponse>(source)

Convenience function that performs the complete screencast session flow: creates a session, selects sources, and starts the session.

Return

Result containing StartResponse with the selected PipeWire streams.

Parameters

types

Set of source types to allow the user to select.

multiple

Whether to allow selecting multiple sources.

cursorMode

How the cursor should appear in the stream.

restoreToken

Optional token to restore a previous session (version 4+).

persistMode

How this session should persist (version 4+).

parentWindow

Identifier for the application window. Use empty string if no parent window.