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.contentShareDidStart
will be notified. If sharing fails or stops,ContentShareObserver.contentShareDidStop
will be invoked withContentShareStatus
as 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
ContentShareSource
as the one being transmitted.Declaration
Swift
func startContentShare(source: ContentShareSource)
Parameters
source
source of content to be shared
-
Start sharing the content of a given
ContentShareSource
, with configurations.Once sharing has started successfully,
ContentShareObserver.contentShareDidStart
will be notified. If sharing fails or stops,ContentShareObserver.contentShareDidStop
will be invoked withContentShareStatus
as 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
ContentShareSource
as the one being transmitted.Declaration
Swift
func startContentShare(source: ContentShareSource, config: LocalVideoConfiguration)
Parameters
source
source of content to be shared
config
configurations of emitted video stream, e.g maxBitRateKbps
-
Stop sharing the content of a
ContentShareSource
that previously started.Once the sharing stops successfully,
ContentShareObserver.contentShareDidStop
will 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
observer
observer to be notified for events
-
Unsubscribe the given observer from content share events.
Declaration
Swift
func removeContentShareObserver(observer: ContentShareObserver)
Parameters
observer
observer to be removed for events