ContentShareController
@objc
public protocol ContentShareController
ContentShareController exposes methods for starting and stopping content share with a ContentShareSource.
The content represents a media steam to be shared in the meeting, such as screen capture or media files.
Please refer to content share guide for details.
-
Start sharing the content of a given
ContentShareSource.Once sharing has started successfully,
ContentShareObserver.contentShareDidStartwill be notified. If sharing fails or stops,ContentShareObserver.contentShareDidStopwill be invoked withContentShareStatusas the cause.This will call
VideoSource.addVideoSink(sink:)on the provided source andVideoSource.removeVideoSink(sink:)on the previously provided source.Calling this function repeatedly will replace the previous
ContentShareSourceas the one being transmitted.Declaration
Swift
func startContentShare(source: ContentShareSource)Parameters
sourcesource of content to be shared
-
Start sharing the content of a given
ContentShareSource, with configurations.Once sharing has started successfully,
ContentShareObserver.contentShareDidStartwill be notified. If sharing fails or stops,ContentShareObserver.contentShareDidStopwill be invoked withContentShareStatusas the cause.This will call
VideoSource.addVideoSink(sink:)on the provided source andVideoSource.removeVideoSink(sink:)on the previously provided source.Calling this function repeatedly will replace the previous
ContentShareSourceas the one being transmitted.Declaration
Swift
func startContentShare(source: ContentShareSource, config: LocalVideoConfiguration)Parameters
sourcesource of content to be shared
configconfigurations of emitted video stream, e.g maxBitRateKbps
-
Stop sharing the content of a
ContentShareSourcethat previously started.Once the sharing stops successfully,
ContentShareObserver.contentShareDidStopwill be invoked with status codeContentShareStatusCode.OK.Declaration
Swift
func stopContentShare() -
Subscribe the given observer to content share events (sharing started and stopped).
Declaration
Swift
func addContentShareObserver(observer: ContentShareObserver)Parameters
observerobserver to be notified for events
-
Unsubscribe the given observer from content share events.
Declaration
Swift
func removeContentShareObserver(observer: ContentShareObserver)Parameters
observerobserver to be removed for events