ScreenShareStore provides a complete set of screen sharing APIs, including full-screen sharing on mobile, and screen / window source enumeration and targeted sharing on desktop (Win/Mac).ScreenShareStore instance. Do not attempt to initialize directly.Property | Type | Description |
screenStatus | Screen sharing status. |
Function | Description |
Singleton object. | |
Start screen sharing. | |
Stop screen sharing. | |
Reset to default state. |
abstract fun startScreenShare()
abstract fun stopScreenShare()
abstract fun reset()
Property | Type | Description |
screenStatus | Screen sharing status. |
// Get singleton instanceval store = ScreenShareStore.shared()// Subscribe to state changeslifecycleScope.launch {store.screenShareState.screenStatus.collect { status ->println("Screen sharing status: $status")}}// Start screen sharingstore.startScreenShare()// Stop screen sharingstore.stopScreenShare()
文档反馈