• 製品
  • 料金
  • リソース
  • サポート
このページは現在英語版のみで提供されており、日本語版も近日中に提供される予定です。ご利用いただきありがとうございます。
Feedback

ScreenShareStore

Introduction

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).
Notice:
Use ScreenShareStore.shared singleton to get the ScreenShareStore instance. Do not attempt to initialize directly.
Note:
Screen sharing state updates are delivered through the screenShareState publisher. Subscribe to it to receive real-time updates about screen sharing status.

Features

Screen Sharing: Start and stop screen sharing, with support for iOS App Group and desktop capture property configuration.
Source Enumeration: Enumerate shareable screens and application windows with thumbnails and icons for building source-picker UI (desktop only).
State Subscription: Real-time subscription to screen sharing state changes.

Subscribable Data

ScreenShareState fields are described below:
Property
Type
Description
screenStatus
StateFlow<DeviceStatus>
Screen sharing status.

API List

Function
Description
Singleton object.
Start screen sharing.
Stop screen sharing.
reset
Reset to default state.

Getting Instance

ScreenShareStore.shared

Singleton object.

Screen Sharing

startScreenShare

Start screen sharing.
abstract fun startScreenShare()
Version
Supported since version 3.5.

stopScreenShare

Stop screen capture.
abstract fun stopScreenShare()
Version
Supported since version 3.5.

Reset

reset

Reset to default state.
abstract fun reset()
Version
Supported since version 3.5.

Data Structures

ScreenShareState

Screen sharing state.
Property
Type
Description
screenStatus
StateFlow<DeviceStatus>
Screen sharing status.

Usage Example

// Get singleton instance
val store = ScreenShareStore.shared()
// Subscribe to state changes
lifecycleScope.launch {
store.screenShareState.screenStatus.collect { status ->
println("Screen sharing status: $status")
}
}
// Start screen sharing
store.startScreenShare()
// Stop screen sharing
store.stopScreenShare()