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. |
public func startScreenShare(appGroup: String) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
appGroup | String | The value must match the App Group string configured in the Broadcast Upload Extension, used for sharing data between the host app and the Extension, in the format group.<reverse-domain>. Passing an empty string is allowed but does not guarantee screen sharing stability; configuring it correctly is recommended. |
public func stopScreenShare() {fatalError("\\(#function) must be overridden by subclass")}
public func reset() {fatalError("\\(#function) must be overridden by subclass")}
Property | Type | Description |
screenStatus | Screen sharing status. |
// Get singleton instancelet store = ScreenShareStore.shared// Subscribe to state changesstore.state.subscribe { state inprint("Screen sharing status: \\(state.screenStatus)")}// Start screen sharingstore.startScreenShare(appGroup: "group.com.example.app")// Stop screen sharingstore.stopScreenShare()
フィードバック