Event
ZegoUIKitPrebuiltCallInvitationServiceDelegate
Set Delegate
ZegoUIKitPrebuiltCallInvitationService.shared.delegate = self
1
requireConfig
- function prototype:
Untitledfunc requireConfig(_ data: ZegoCallInvitationData) -> ZegoUIKitPrebuiltCallConfig
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func requireConfig(_ data: ZegoCallInvitationData) -> ZegoUIKitPrebuiltCallConfig { if data.type == .voiceCall { if data.invitees?.count ?? 0 > 1 { let config = ZegoUIKitPrebuiltCallConfig.groupVoiceCall() return config } else { let config = ZegoUIKitPrebuiltCallConfig.oneOnOneVoiceCall() return config } } else { if data.invitees?.count ?? 0 > 1 { let config = ZegoUIKitPrebuiltCallConfig.groupVideoCall() return config } else { let config = ZegoUIKitPrebuiltCallConfig.oneOnOneVideoCall() return config } } } }
1
onIncomingCallDeclineButtonPressed
- function prototype:
Untitledfunc onIncomingCallDeclineButtonPressed()
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onIncomingCallDeclineButtonPressed() { //... } }
1
onIncomingCallAcceptButtonPressed
- function prototype:
Untitledfunc onIncomingCallAcceptButtonPressed()
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onIncomingCallAcceptButtonPressed() { //... } }
1
onOutgoingCallCancelButtonPressed
- function prototype:
Untitledfunc onOutgoingCallCancelButtonPressed()
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onOutgoingCallCancelButtonPressed() { //... } }
1
onIncomingCallReceived
- function prototype:
Untitledfunc onIncomingCallReceived(_ callID: String, caller: ZegoCallUser, callType: ZegoCallType, callees: [ZegoCallUser]?)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onIncomingCallReceived(_ callID: String, caller: ZegoCallUser, callType: ZegoCallType, callees: [ZegoCallUser]?) { //... } }
1
onIncomingCallCanceled
- function prototype:
Untitledfunc onIncomingCallCanceled(_ callID: String, caller: ZegoCallUser)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onIncomingCallCanceled(_ callID: String, caller: ZegoCallUser) { //... } }
1
onOutgoingCallAccepted
- function prototype:
Untitledfunc onOutgoingCallAccepted(_ callID: String, callee: ZegoCallUser)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onOutgoingCallAccepted(_ callID: String, callee: ZegoCallUser) { //... } }
1
onOutgoingCallRejectedCauseBusy
- function prototype:
Untitledfunc onOutgoingCallRejectedCauseBusy(_ callID: String, callee: ZegoCallUser)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onOutgoingCallRejectedCauseBusy(_ callID: String, callee: ZegoCallUser) { //... } }
1
onOutgoingCallDeclined
- function prototype:
Untitledfunc onOutgoingCallDeclined(_ callID: String, callee: ZegoCallUser)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onOutgoingCallDeclined(_ callID: String, callee: ZegoCallUser) { //... } }
1
onIncomingCallTimeout
- function prototype:
Untitledfunc onIncomingCallTimeout(_ callID: String, caller: ZegoCallUser)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onIncomingCallTimeout(_ callID: String, caller: ZegoCallUser) { //... } }
1
onOutgoingCallTimeout
- function prototype:
Untitledfunc onOutgoingCallTimeout(_ callID: String, callees: [ZegoCallUser])
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onOutgoingCallTimeout(_ callID: String, callees: [ZegoCallUser]) { //... } }
1
onCallTimeUpdate
- function prototype:
Untitledfunc onCallTimeUpdate(_ duration: Int)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onCallTimeUpdate(_ duration: Int) { //... } }
1
ZegoUIKitPrebuiltCallVCDelegate
Set Delegate
ZegoUIKitPrebuiltCallInvitationService.shared.callVCDelegate = self
1
getForegroundView
- function prototype:
Untitledfunc getForegroundView(_ userInfo: ZegoUIKitUser?) -> ZegoBaseAudioVideoForegroundView?
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getForegroundView(_ userInfo: ZegoUIKitUser?) -> ZegoBaseAudioVideoForegroundView? { //... } }
1
getMemberListItemView
- function prototype:
Untitledfunc getMemberListItemView(_ tableView: UITableView, indexPath: IndexPath, userInfo: ZegoUIKitUser) -> UITableViewCell?
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getMemberListItemView(_ tableView: UITableView, indexPath: IndexPath, userInfo: ZegoUIKitUser) -> UITableViewCell? { //... } }
1
getMemberListviewForHeaderInSection
- function prototype:
Untitledfunc getMemberListviewForHeaderInSection(_ tableView: UITableView, section: Int) -> UIView?
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getMemberListviewForHeaderInSection(_ tableView: UITableView, section: Int) -> UIView? { //... } }
1
getMemberListItemHeight
- function prototype:
Untitledfunc getMemberListItemHeight(_ userInfo: ZegoUIKitUser) -> CGFloat
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getMemberListItemHeight(_ userInfo: ZegoUIKitUser) -> CGFloat { //... } }
1
getMemberListHeaderHeight
- function prototype:
Untitledfunc getMemberListHeaderHeight(_ tableView: UITableView, section: Int) -> CGFloat
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getMemberListHeaderHeight(_ tableView: UITableView, section: Int) -> CGFloat { //... } }
1
onCallEnd
- function prototype:
Untitledfunc onCallEnd(_ endEvent: ZegoCallEndEvent)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onCallEnd(_ endEvent: ZegoCallEndEvent) { print("reason: \(String(describing: endEvent.reason)) kickerUserID: \(endEvent.kickerUserID)") } }
1
onToggleMicButtonClick
- function prototype:
Untitledfunc onToggleMicButtonClick(_ isOn: Bool)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onToggleMicButtonClick(_ isOn: Bool) { //... } }
1
onToggleCameraButtonClick
- function prototype:
Untitledfunc onToggleCameraButtonClick(_ isOn: Bool)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onToggleCameraButtonClick(_ isOn: Bool) { //... } }
1
onSwitchCameraButtonClick
- function prototype:
Untitledfunc onSwitchCameraButtonClick(_ isFrontFacing: Bool)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onSwitchCameraButtonClick(_ isFrontFacing: Bool) { //... } }
1
onAudioOutputButtonClick
- function prototype:
Untitledfunc onAudioOutputButtonClick(_ isSpeaker: Bool)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onAudioOutputButtonClick(_ isSpeaker: Bool) { //... } }
1
onOnlySelfInRoom
- function prototype:
Untitledfunc onOnlySelfInRoom()
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onOnlySelfInRoom() { //... } }
1
getChatViewItemView
- function prototype:
Untitledfunc getChatViewItemView(_ tableView: UITableView, indexPath: IndexPath, message: ZegoInRoomMessage) -> UITableViewCell?
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getChatViewItemView(_ tableView: UITableView, indexPath: IndexPath, message: ZegoInRoomMessage) -> UITableViewCell? { //... } }
1
getChatViewItemHeight
- function prototype:
Untitledfunc getChatViewItemHeight(_ tableView: UITableView, heightForRowAt indexPath: IndexPath, message: ZegoInRoomMessage) -> CGFloat
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getChatViewItemHeight(_ tableView: UITableView, heightForRowAt indexPath: IndexPath, message: ZegoInRoomMessage) -> CGFloat { //... } }
1
onCallTimeUpdate
- function prototype:
Untitledfunc onCallTimeUpdate(_ duration: Int)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onCallTimeUpdate(_ duration: Int) { //... } }
1
onAudioOutputDeviceChanged
- function prototype:
Untitledfunc onAudioOutputDeviceChanged(_ audioOutput: ZegoUIKitAudioOutputDevice)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onAudioOutputDeviceChanged(_ audioOutput: ZegoUIKitAudioOutputDevice) { // ... } }
1
ZegoUIKitEventHandle
onIMRecvCustomCommand
This callback is triggered when a user receives a custom command sent by another user in the room.
- function prototype:
Untitledfunc onIMRecvCustomCommand(_ fromUser: ZegoUIKitUser, command: String)
1
- example:
Untitledextension ViewController: ZegoUIKitEventHandle { func onIMRecvCustomCommand(_ fromUser: ZegoUIKitUser, command: String) { // ... } }
1