Video SDK for iOS API Reference
Loading...
Searching...
No Matches
ZoomVideoSDKShareHelper Class Reference

Share control interface. More...

#include <ZoomVideoSDKShareHelper.h>

Inherits NSObject.

Instance Methods

(ZoomVideoSDKError- startShareWithView:
 Shares a selected view.
 
(ZoomVideoSDKError- startSharingExternalSource:andAudioSource:
 Shares an external source.
 
(ZoomVideoSDKError- startSharingExternalSource:andAudioSource:isPlaying:
 Shares an external source.
 
(ZoomVideoSDKError- enablePlaySharingAudioRawdata:
 Enables or disables local playback of shared audio raw data.
 
(ZoomVideoSDKError- stopShare
 Stops view or screen share.
 
(ZoomVideoSDKError- pauseShare
 Pauses share. For camera share, the presenter can pause the share to support annotation.
 
(ZoomVideoSDKError- resumeShare
 Resumes share. For camera share, the presenter can restart the camera share.
 
(ZoomVideoSDKError- lockShare:
 Locks sharing the view or screen. Only the host can call this method.
 
(BOOL) - isShareLocked
 Determines whether sharing the view or screen is locked.
 
(BOOL) - isSharingOut
 Determines whether the current user is sharing.
 
(BOOL) - isOtherSharing
 Determines whether another user is sharing.
 
(BOOL) - isScreenSharingOut
 Determines whether the current user is sharing the screen.
 
(BOOL) - isShareDeviceAudioEnabled
 Determines whether the SDK has enabled share device audio when screen sharing.
 
(BOOL) - enableShareDeviceAudio:
 Enables or disables the device audio shared together when screen sharing.
 
(BOOL) - isAnnotationFeatureSupport
 Determines whether annotation feature is supported.
 
(ZoomVideoSDKError- disableViewerAnnotation:
 Disables or enables viewer's annotation by the share owner.
 
(BOOL) - isViewerAnnotationDisabled
 Determines whether annotation on current sharing is disabled.
 
(ZoomVideoSDKAnnotationHelper *_Nullable) - createAnnotationHelper:
 Creates annotation helper based on shared view.
 
(ZoomVideoSDKError- destroyAnnotationHelper:
 Destroys annotation helper.
 
(ZoomVideoSDKError- setAnnotationVanishingToolTime:vanishingTime:
 Sets the vanishing tool time config.
 
(NSUInteger) - getAnnotationVanishingToolDisplayTime
 Gets the current vanishing tool display time.
 
(NSUInteger) - getAnnotationVanishingToolVanishingTime
 Gets the current vanishing tool vanishing time.
 
(ZoomVideoSDKError- enableMultiShare:
 Enables or disables participants can share simultaneously.
 
(BOOL) - isMultiShareEnabled
 Determines whether multi share is enabled.
 
(ZoomVideoSDKError- startShareCamera:
 Shares the selected camera. Query the selected camera using ZoomVideoSDKVideoHelper::getCameraDeviceList.
 
(ZoomVideoSDKError- startShareWithPreprocessing:sharePreprocessor:
 Starts share preprocessing.
 
(ZoomVideoSDKError- applyPreprocessingOverlayImage:
 Applies a UIImage overlay to the shared image stream when using (when you share with startShareWithPreprocessing:sharePreprocessor: or startInAppScreenShare). Use this method to cover the shared content with an image during preprocessing.
 
(void) - removePreprocessingOverlayImage
 Removes the currently applied UIImage overlay from the shared image stream when using (when you share with startShareWithPreprocessing:sharePreprocessor: or startInAppScreenShare).
 
(BOOL) - isSupportInAppScreenShare
 Checks whether the system supports in-app screen share.
 
(ZoomVideoSDKError- startInAppScreenShare
 Starts in-app screen share.
 
(ZoomVideoSDKError- setAnnotationView:
 Sets the annotation view when the view hierarchy changes.
 

Detailed Description

Share control interface.

Definition at line 111 of file ZoomVideoSDKShareHelper.h.

Method Documentation

◆ applyPreprocessingOverlayImage:

- (ZoomVideoSDKError) applyPreprocessingOverlayImage: (UIImage *_Nullable) image

Applies a UIImage overlay to the shared image stream when using (when you share with startShareWithPreprocessing:sharePreprocessor: or startInAppScreenShare). Use this method to cover the shared content with an image during preprocessing.

Parameters
imageThe UIImage to overlay on top of the shared image. The UIImage is fully covered the current share frame before it is sent to viewers.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ createAnnotationHelper:

- (ZoomVideoSDKAnnotationHelper *_Nullable) createAnnotationHelper: (UIView *_Nullable) view

Creates annotation helper based on shared view.

Parameters
viewThe shared view. Pass nil to return the helper for self sharing.
Returns
If the function succeeds, it returns a ZoomVideoSDKAnnotationHelper object. Otherwise, this function fails and returns nil.
Warning
The view passed in this function should be subscribed share view. And if the share view aspect mode is full fill, the annotate is not supported. When the share owner does not support the feature of annotate, the others should not do annotate in that case.

◆ destroyAnnotationHelper:

- (ZoomVideoSDKError) destroyAnnotationHelper: (ZoomVideoSDKAnnotationHelper *_Nullable) helper

Destroys annotation helper.

Parameters
helperThe ZoomVideoSDKAnnotationHelper.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ disableViewerAnnotation:

- (ZoomVideoSDKError) disableViewerAnnotation: (BOOL) disable

Disables or enables viewer's annotation by the share owner.

Parameters
disableYES to disable annotation, NO to enable.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Only the share owner can call this function.

◆ enableMultiShare:

- (ZoomVideoSDKError) enableMultiShare: (BOOL) enable

Enables or disables participants can share simultaneously.

Parameters
enableYES to enable, NO to disable.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
When you switch multi share from enable to disable, all sharing will be stopped.

◆ enablePlaySharingAudioRawdata:

- (ZoomVideoSDKError) enablePlaySharingAudioRawdata: (BOOL) bPlay

Enables or disables local playback of shared audio raw data.

Parameters
bPlayYES to play shared audio raw data, NO not to play.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ enableShareDeviceAudio:

- (BOOL) enableShareDeviceAudio: (BOOL) enable

Enables or disables the device audio shared together when screen sharing.

Parameters
enableYES to share audio out, NO otherwise.
Returns
YES if the function succeeds. Otherwise, NO.

◆ getAnnotationVanishingToolDisplayTime

- (NSUInteger) getAnnotationVanishingToolDisplayTime

Gets the current vanishing tool display time.

Note
This function can only retrieve the timer settings for your own share.
Returns
The time in milliseconds the tool remains visible before fading.

◆ getAnnotationVanishingToolVanishingTime

- (NSUInteger) getAnnotationVanishingToolVanishingTime

Gets the current vanishing tool vanishing time.

Returns
The time in milliseconds for the tool to fade out after displayTime.
Note
This function can only retrieve the timer settings for your own share.

◆ isAnnotationFeatureSupport

- (BOOL) isAnnotationFeatureSupport

Determines whether annotation feature is supported.

Returns
YES if annotation feature is supported. Otherwise, NO.

◆ isMultiShareEnabled

- (BOOL) isMultiShareEnabled

Determines whether multi share is enabled.

Returns
YES if multi share is enabled. Otherwise, NO.

◆ isOtherSharing

- (BOOL) isOtherSharing

Determines whether another user is sharing.

Returns
YES if another user is sharing. Otherwise, NO.

◆ isScreenSharingOut

- (BOOL) isScreenSharingOut

Determines whether the current user is sharing the screen.

Returns
YES if the current user is sharing the screen. Otherwise, NO.

◆ isShareDeviceAudioEnabled

- (BOOL) isShareDeviceAudioEnabled

Determines whether the SDK has enabled share device audio when screen sharing.

Returns
YES if share device audio is enabled. Otherwise, NO.

◆ isShareLocked

- (BOOL) isShareLocked

Determines whether sharing the view or screen is locked.

Returns
YES if sharing is locked. Otherwise, NO.

◆ isSharingOut

- (BOOL) isSharingOut

Determines whether the current user is sharing.

Returns
YES if the current user is sharing. Otherwise, NO.

◆ isSupportInAppScreenShare

- (BOOL) isSupportInAppScreenShare

Checks whether the system supports in-app screen share.

Returns
YES if the device supports in-app screen share. Otherwise, NO.

◆ isViewerAnnotationDisabled

- (BOOL) isViewerAnnotationDisabled

Determines whether annotation on current sharing is disabled.

Returns
YES if annotation is disabled. Otherwise, NO.
Warning
Only the share owner can call this function.

◆ lockShare:

- (ZoomVideoSDKError) lockShare: (BOOL) lock

Locks sharing the view or screen. Only the host can call this method.

Parameters
lockYES to lock sharing, NO to unlock.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Only host or manager can call the function.

◆ pauseShare

- (ZoomVideoSDKError) pauseShare

Pauses share. For camera share, the presenter can pause the share to support annotation.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ removePreprocessingOverlayImage

- (void) removePreprocessingOverlayImage

Removes the currently applied UIImage overlay from the shared image stream when using (when you share with startShareWithPreprocessing:sharePreprocessor: or startInAppScreenShare).

Note
Once removed, the raw shared content is sent directly to viewers without any overlay. Call this method when you no longer need to display the overlay (for example, when a covered image is no longer required).

◆ resumeShare

- (ZoomVideoSDKError) resumeShare

Resumes share. For camera share, the presenter can restart the camera share.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ setAnnotationVanishingToolTime:vanishingTime:

- (ZoomVideoSDKError) setAnnotationVanishingToolTime: (NSUInteger) displayTime
vanishingTime: (NSUInteger) vanishingTime 

Sets the vanishing tool time config.

Parameters
displayTimeThe time in milliseconds the tool remains visible before fading.
vanishingTimeThe time in milliseconds for the tool to fade out after displayTime.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Note
This setting only takes effect for the user's own share. The displayTime can be 0 or up to 15000 milliseconds (15 seconds), and the vanishingTime must be greater than 1000 milliseconds (1 second) and less than or equal to 15000 milliseconds (15 seconds).

◆ setAnnotationView:

- (ZoomVideoSDKError) setAnnotationView: (UIView *_Nullable) annoParentView

Sets the annotation view when the view hierarchy changes.

Parameters
annoParentViewThe top-level view for the shared content.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
This API is only available in in-app screen share mode.

◆ startInAppScreenShare

- (ZoomVideoSDKError) startInAppScreenShare

Starts in-app screen share.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Can only be called once every 500ms.

◆ startShareCamera:

- (ZoomVideoSDKError) startShareCamera: (UIView *_Nullable) parentView

Shares the selected camera. Query the selected camera using ZoomVideoSDKVideoHelper::getCameraDeviceList.

Parameters
parentViewThe share view to show the camera for the presenter.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Note
The presenter can use ZoomVideoSDKShareHelper::pauseShare to enable viewer annotation. If the camera is paused, the presenter can use ZoomVideoSDKShareHelper::resumeShare to resume. Notice: The user should start video before start share camera, otherwise the error Errors_Session_Share_Camera_Video_Not_Start.

◆ startShareWithPreprocessing:sharePreprocessor:

- (ZoomVideoSDKError) startShareWithPreprocessing: (ZoomVideoSDKSharePreprocessParam *_Nullable) param
sharePreprocessor: (id< ZoomVideoSDKSharePreprocessor > _Nullable) preProcessDelegate 

Starts share preprocessing.

Parameters
paramThe share preprocessing parameters.
preProcessDelegateThe object that handles preprocessing events.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Note
If pAudioSource is non-null, it means share user-defined audio at the same time.
This share type should use the CptShare.framework, zm_annoter_dynamic.framework.

◆ startShareWithView:

- (ZoomVideoSDKError) startShareWithView: (UIView *_Nullable) view

Shares a selected view.

Parameters
viewThe view to be shared.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
View, recommend to pass a single UIView's object, such as UIView, UIImageView or WKWebView.
It is not recommended to pass UIView after adding subview WKWebView or UIImageView.

◆ startSharingExternalSource:andAudioSource:

- (ZoomVideoSDKError) startSharingExternalSource: (id< ZoomVideoSDKShareSource > _Nullable) shareDelegate
andAudioSource: (id< ZoomVideoSDKShareAudioSource > _Nullable) audioDelegate 

Shares an external source.

Parameters
shareDelegateThe external share source.
audioDelegateThe external share audio source.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
If audioDelegate is non-null, it means share user-defined audio at the same time.
Deprecated
Use startSharingExternalSource:andAudioSource:isPlaying: instead.

◆ startSharingExternalSource:andAudioSource:isPlaying:

- (ZoomVideoSDKError) startSharingExternalSource: (id< ZoomVideoSDKShareSource > _Nullable) shareDelegate
andAudioSource: (id< ZoomVideoSDKShareAudioSource > _Nullable) audioDelegate
isPlaying: (BOOL) isPlaying 

Shares an external source.

Parameters
shareDelegateThe external share source.
audioDelegateThe external share audio source.
isPlayingYES to play shared audio raw data, NO not to play.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
If audioDelegate is non-null, it means share user-defined audio at the same time.

◆ stopShare

- (ZoomVideoSDKError) stopShare

Stops view or screen share.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.