// // ZMVideoSDKDelegate.h // ZMVideoSDK // #import #import "ZMVideoSDKDef.h" @class ZMVideoSDKUserHelper; @class ZMVideoSDKVideoHelper; @class ZMVideoSDKAudioHelper; @class ZMVideoSDKShareHelper; @class ZMVideoSDKLiveStreamHelper; @class ZMVideoSDKChatHelper; @class ZMVideoSDKAudioRawData; @class ZMVideoSDKUser; @class ZMVideoSDKChatMessage; @class ZMVideoSDKPasswordHandler; @class ZMVideoSDKCameraControlRequestHandler; @class ZMVideoSDKRawDataPipe; @class ZMVideoSDKLiveTranscriptionLanguage; @class ZMVideoSDKSSLCertificateInfo; @class ZMVideoSDKProxySettingHandler; @class ZMVideoSDKRecordingConsentHandler; @class ZMVideoSDKLiveTranscriptionMessageInfo; @class ZMVideoSDKAnnotationHelper; @class ZMVideoSDKVideoCanvas; @class ZMVideoSDKSendFile; @class ZMVideoSDKReceiveFile; /** @brief A listener class that groups together the callbacks related to a session. */ @protocol ZMVideoSDKDelegate @optional /** @brief Callback: Invoked when the current user joins the session. */ - (void)onSessionJoin; /** @brief Callback: Invoked when the current user leaves the session. */ - (void)onSessionLeave; /** @brief Callback: Invoked when errors occur. @param ErrorType Provides error code associated with the error. See {@link ZMVideoSDKErrors} for more information. @param details Detailed errorCode. */ - (void)onError:(ZMVideoSDKErrors)ErrorType detail:(int)details; /** @brief Callback: Invoked when a user joins the session. @param userHelper User help utility. @param userArray List of users who have just joined the session. */ - (void)onUserJoin:(ZMVideoSDKUserHelper*)userHelper userList:(NSArray*)userArray; /** @brief Triggered when other users leave session. @param userHelper The pointer of user helper object. @param userArray An array contains the users leaved. */ - (void)onUserLeave:(ZMVideoSDKUserHelper*)userHelper userList:(NSArray*)userArray; /** @brief Callback: Invoked when a user makes changes to their video, such as starting or stopping their video. @param videoHelper The pointer of video helper object. @param userArray The array contain user objoct. */ - (void)onUserVideoStatusChanged:(ZMVideoSDKVideoHelper*)videoHelper userList:(NSArray*)userArray; /** @brief Callback: Invoked when a user makes changes to their audio, such as muting or unmuting their audio. @param audioHelper The pointer of audio helper object. @param userArray The array contain user objoct. */ - (void)onUserAudioStatusChanged:(ZMVideoSDKAudioHelper*)audioHelper userList:(NSArray*)userArray; /** @brief Callback: Invoked when a user makes changes to their sharing status, such as starting screen sharing, starting view sharing, or stopping sharing. @param shareHelper The pointer of share helper object. @param user The pointer of user helper object. @param status The current status of share. @param shareType The current type of share. */ - (void)onUserShareStatusChanged:(ZMVideoSDKShareHelper*)shareHelper user:(ZMVideoSDKUser*)user status:(ZMVideoSDKShareStatus)status shareType:(ZMVideoSDKShareType)shareType; /** @brief Callback: Invoked when a user makes changes to their live stream status. @param liveStreamHelper The pointer of live stream helper object. @param status The current status of live stream. */ - (void)onLiveStreamStatusChanged:(ZMVideoSDKLiveStreamHelper*)liveStreamHelper liveStreamStatus:(ZMVideoSDKLiveStreamStatus)status; /** @brief Callback: Invoked when receiving a chat message. @param chatHelper The pointer of chat helper object. @param chatMessage The pointer of chat message object. */ - (void)onChatNewMessageNotify:(ZMVideoSDKChatHelper*)chatHelper chatMessage:(ZMVideoSDKChatMessage*)chatMessage; /** @brief Callback: Invoked when the session host changes. @param userHelper The pointer of user helper object. @param user The pointer of user object. */ - (void)onUserHostChanged:(ZMVideoSDKUserHelper*)userHelper user:(ZMVideoSDKUser*)user; /** @brief Callback: Invoked when the active audio changes. @param audioHelper The pointer of audio helper object. @param userArray Active audio list. */ - (void)onUserActiveAudioChanged:(ZMVideoSDKAudioHelper*)audioHelper userList:(NSArray*)userArray; /** @brief Callback: Invoked when the session requires a password to join. @param handle The pointer to password handler object. */ - (void)onSessionNeedPassword:(ZMVideoSDKPasswordHandler*)handle; /** @brief Callback: Invoked when the provided session password is wrong or invalid. @param handle The pointer to password handler object. */ - (void)onSessionPasswordWrong:(ZMVideoSDKPasswordHandler*)handle; /** @brief Callback: Invoked when mixed (all users) audio raw data received. @param data The pointer of audio raw data. */ - (void)onMixedAudioRawDataReceived:(ZMVideoSDKAudioRawData*)data; /** @brief Callback: Invoked when individual user's audio raw data received. @param data Raw audio data. {@link ZMVideoSDKAudioRawData}. @param user The user object associated with the raw audio data. */ - (void)onOneWayAudioRawDataReceived:(ZMVideoSDKAudioRawData*)data user:(ZMVideoSDKUser*)user; /** @brief Callback: Invoked when the manager of the session changes. @param user The pointer of user object. */ - (void)onUserManagerChanged:(ZMVideoSDKUser*)user; /** @brief Callback: Invoked when a user changes their name. @param user The pointer of user object. */ - (void)onUserNameChanged:(ZMVideoSDKUser*)user; /** @brief Callback: Invoked when receiving shared raw audio data. @param data Raw audio data. {@link ZMVideoSDKAudioRawData}. */ - (void)onSharedAudioRawDataReceived:(ZMVideoSDKAudioRawData*)data; /** @brief Callback: Invoked when cloud recording status has paused, stopped, resumed, or otherwise changed. @param status Cloud recording status defined in {@link ZMRecordingStatus}. */ - (void)onCloudRecordingStatus:(ZMRecordingStatus)status DEPRECATED_MSG_ATTRIBUTE("Use -onCloudRecordingStatus:recordAgreementHandler: instead"); /** @brief Callback: Invoked when cloud recording status has paused, stopped, resumed, or otherwise changed. @param status Cloud recording status defined in {@link ZMRecordingStatus}. @param handler When the cloud recording starts, this object is used to let the user choose whether to accept or not. */ - (void)onCloudRecordingStatus:(ZMRecordingStatus)status recordingConsentHandler:(ZMVideoSDKRecordingConsentHandler *)handler; /** @brief Invoked when a user consents to individual recording. @param user The pointer to the user object. */ - (void)onUserRecordingConsent:(ZMVideoSDKUser *)user; /** @brief Once the command channel is active, this callback is triggered each time a message is received. @param commandContent Received command. @param user The user who sent the command. */ - (void)onCommandReceived:(NSString*)commandContent senderUser:(ZMVideoSDKUser*)user; /** @brief Callback for when the current user is granted camera control access. @note Once the current user sends the camera control request, this callback will be triggered with the result of the request. @param user The pointer to the user who received the request. @param isApproved The result of the camera control request. */ - (void)onCameraControlRequestResult:(ZMVideoSDKUser*)user approved:(BOOL)isApproved; /** @brief Callback interface for when the current user has received a camera control request. @note This will be triggered when another user requests control of the current users camera. @param user The pointer to the user who sent the request. @param requestType The request type. @param cameraControlRequestHandler The pointer to the helper instance of the camera controller. See {@link ZMVideoSDKCameraControlRequestHandler}. */ - (void)onCameraControlRequestReceived:(ZMVideoSDKUser*)user cameraControlRequestType:(ZMVideoSDKCameraControlRequestType)requestType requestHandler:(ZMVideoSDKCameraControlRequestHandler*)cameraControlRequestHandler; /** @brief When the SDK attempts to establish a connection for the command channel when joining a session, this callback is triggered once the connection attempt for the command channel is completed. @param isSuccess YES: Success, command channel is ready to be used. NO: Failure, command channel was unable to connect. */ - (void)onCommandChannelConnectResult:(BOOL)isSuccess; /** @brief Callback: Invoked when a host requests you to unmute yourself. */ - (void)onHostAskUnmute; /** @brief Callback: Invoked when the invite by phone status changes to any other valid status such as Calling, Ringing, Success, or Failed. @param status Invite by phone status. See {@link ZMPhoneStatus}. @param reason Invite by phone failed reason. See {@link ZMPhoneFailedReason}. */ - (void)onInviteByPhoneStatus:(ZMPhoneStatus)status reason:(ZMPhoneFailedReason)reason; /** @brief Callback: Invoked when someone in a given session enables or disables multi-camera. All participants in the session receive this callback. @param status The status of camera, refer to {@link ZMVideoSDKMultiCameraStreamStatus}. @param user The user who enabled multi-camera. See {@link ZMVideoSDKUser}. @param videoPipe The data pipe for the multi-camera. See {@link ZMVideoSDKMultiCameraStreamStatus}. */ - (void)onMultiCameraStreamStatusChanged:(ZMVideoSDKMultiCameraStreamStatus)status user:(ZMVideoSDKUser *)user rawDataPipe:(ZMVideoSDKRawDataPipe *)videoPipe; /** @brief Notify the current mic or speaker volume when testing. @param micVolume Specify the volume of the mic. @param speakerVolume Specify the volume of the speaker. */ - (void)onMicSpeakerVolumeChanged:(unsigned int)micVolume speakerVolume:(unsigned int)speakerVolume; /** @brief Notify that either mic device or speaker device status changed. @param type The audio device type. @param status The audio device status. */ - (void)onAudioDeviceStatusChanged:(ZMVideoSDKAudioDeviceType)type status:(ZMVideoSDKAudioDeviceStatus)status; /** @brief Notify the mic status when testing. @param status The mic status. */ - (void)onTestMicStatusChanged:(ZMVideoSDKMicTestStatus)status; /** @brief Notify the user that a mic/speaker device is selected when testing. Then the SDK will close the mic/speaker testing. The user shall restart the test manually if he still wants to test. */ - (void)onSelectedAudioDeviceChanged; /** @brief Notify that the camera list has updated. */ - (void)onCameraListChanged; /** @brief Callback: Invoked when live transcription status changes. @param status The live transcription status. See {@link ZMVideoSDKLiveTranscriptionStatus}. */ - (void)onLiveTranscriptionStatus:(ZMVideoSDKLiveTranscriptionStatus)status; /** @brief Live transcription message received callback. @param message The live transcription message content. @param user The pointer to the user who speaks the message. For more details, refer to {@link ZMVideoSDKUser}. @param type The live transcription operation type. For more details, refer to {@link ZMVideoSDKLiveTranscriptionOperationType}. */ - (void)onLiveTranscriptionMsgReceived:(NSString *)message user:(ZMVideoSDKUser *)user type:(ZMVideoSDKLiveTranscriptionOperationType)type DEPRECATED_MSG_ATTRIBUTE("Use -onLiveTranscriptionMsgInfoReceived: instead"); /** @brief Callback: Invoked when a live transcription message is received. @param messageInfo The live transcription message, refer to {@link ZMVideoSDKLiveTranscriptionMessageInfo}. */ - (void)onLiveTranscriptionMsgInfoReceived:(ZMVideoSDKLiveTranscriptionMessageInfo*)messageInfo; /** @brief Original language message received callback. @param messageInfo The spoken language message, see {@link ZMVideoSDKLiveTranscriptionMessageInfo}. */ - (void)onOriginalLanguageMsgReceived:(ZMVideoSDKLiveTranscriptionMessageInfo*)messageInfo; /** @brief Callback: Invoked when a live translation error occurs. @param spokenLanguage The spoken message language. @param transcriptLanguage The message language you want to translate. */ - (void)onLiveTranscriptionMsgError:(ZMVideoSDKLiveTranscriptionLanguage*)spokenLanguage transcriptLanguage:(ZMVideoSDKLiveTranscriptionLanguage*)transcriptLanguage; /** @brief Callback: Invoked when a user deletes a chat message. @param chatHelper The pointer to chat helper object. @param msgID The deleted message's ID. @param type Indicates by whom the message was deleted, which is defined in {@link ZMVideoSDKChatMessageDeleteType}. */ - (void)onChatMsgDeleteNotification:(ZMVideoSDKChatHelper*)chatHelper messageID:(NSString *)msgID deleteBy:(ZMVideoSDKChatMessageDeleteType)type; /** @brief Callback event of the chat privilege of participant has changed. @param chatHelper The pointer to chat helper object. @param privilege The new chat privilege. */ - (void)onChatPrivilegeChanged:(ZMVideoSDKChatHelper*)chatHelper chatPrivilegeType:(ZMVideoSDKChatPrivilegeType)privilege; /** @brief Notification callback of completing the proxy detection. */ - (void)onProxyDetectComplete; /** @brief The callback will be triggered if the proxy requests to input the username and password. Use the handler to configure the related information. For more details, see {@link ZMVideoSDKProxySettingHandler}. @param handler The handler will be destroyed once the function calls end. */ - (void)onProxySettingNotification:(ZMVideoSDKProxySettingHandler *)handler; /** @brief The callback will be triggered when the SSL is verified. Use the handler to check the related information. For more details, see {@link ZMVideoSDKSSLCertificateInfo}. @param handler The handler will be destroyed once the function calls end. */ - (void)onSSLCertVerifiedFailNotification:(ZMVideoSDKSSLCertificateInfo *)info; /** @brief Callback event of the user's video network quality changes. @param status Video network quality. For more details, see {@link ZMVideoSDKNetworkStatus}. @param user The pointer to a user object. For more details, refer to {@link ZMVideoSDKUser}. */ - (void)onUserVideoNetworkStatusChanged:(ZMVideoSDKNetworkStatus)status user:(ZMVideoSDKUser *)user; /** @brief Callback event of the call CRC device's status. @param status The call status. For more details, see {@link ZMVideoSDKCRCCallStatus}. */ - (void)onCallCRCDeviceStatusChanged:(ZMVideoSDKCRCCallStatus)status; /** @brief Callback event for the vidoe canvas that failed to subscribe. @param failReason The fail reason. For more details, see {@link ZMVideoSDKSubscribeFailReason}. @param user The pointer to the user object whose view we would like to subscribe to. For more details, refer to {@link ZMVideoSDKUser}. @param view The view that failed to subscribe. */ - (void)onVideoCanvasSubscribeFail:(ZMVideoSDKSubscribeFailReason)failReason user:(ZMVideoSDKUser*)user view:(NSView*)view; /** @brief Callback event for the share canvas that failed to subscribe. @param failReason The fail reason. For more details, see {@link ZMVideoSDKSubscribeFailReason}. @param user The pointer to the user object whose view we would like to subscribe to. For more details, refer to {@link ZMVideoSDKUser}. @param view The view that failed to subscribe. */ - (void)onShareCanvasSubscribeFail:(ZMVideoSDKSubscribeFailReason)failReason user:(ZMVideoSDKUser*)user view:(NSView*)view; /** @brief Callback for the annotation helper clean up. SDK will release the ZoomVideoSDKAnnotationHelper object as well. @param helper The helper clean up object. */ - (void)onAnnotationHelperCleanUp:(ZMVideoSDKAnnotationHelper*)helper; /** @brief Callback for the annotation privilege change. @param enable YES means the user is able to annotate, NO means the user is not able to annotate @param user The pointer to a user object who changed viewer's annotation privilege. For more details, refer to {@link ZMVideoSDKUser}. */ - (void)onAnnotationPrivilegeChange:(BOOL)enable shareOwner:(ZMVideoSDKUser*)user; /** @brief Callback for the annotation helper activated. Notify that annotation windows have been created. @param view The view that annotating. */ - (void)onAnnotationHelperActived:(NSView*)view; /** @brief Invoked when send file status make change. @param sendFile The pointer to send file object. For more details, refer to {@link ZMVideoSDKSendFile}. @param status The status of file transfer. For more details, refer to {@link ZMVideoSDKFileTransferStatus}. */ - (void)onSendFile:(ZMVideoSDKSendFile *)sendFile status:(ZMVideoSDKFileTransferStatus)status; /** @brief Invoked when receive file status make change. @param receiveFile The pointer to receive file object. For more details, refer to {@link ZMVideoSDKReceiveFile}. @param status The status of file transfer. For more details, refer to {@link ZMVideoSDKFileTransferStatus}. */ - (void)onReceiveFile:(ZMVideoSDKReceiveFile *)receiveFile status:(ZMVideoSDKFileTransferStatus)status; @end