Event
ZegoUIKitPrebuiltCallInvitationServiceDelegate
设置代理
Untitled
ZegoUIKitPrebuiltCallInvitationService.shared.delegate = self
1
requireConfig
-
函数原型:
Untitledfunc requireConfig(_ data: ZegoCallInvitationData) -> ZegoUIKitPrebuiltCallConfig
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func requireConfig(_ data: ZegoCallInvitationData) -> ZegoUIKitPrebuiltCallConfig { if data.type == .voiceCall { if let invitees = data.invitees, invitees.count > 1 { let config = ZegoUIKitPrebuiltCallConfig.groupVoiceCall() return config } else { let config = ZegoUIKitPrebuiltCallConfig.oneOnOneVoiceCall() return config } } else { if let invitees = data.invitees, invitees.count > 1 { let config = ZegoUIKitPrebuiltCallConfig.groupVideoCall() return config } else { let config = ZegoUIKitPrebuiltCallConfig.oneOnOneVideoCall() return config } } } }
1
onIncomingCallDeclineButtonPressed
-
函数原型:
Untitledfunc onIncomingCallDeclineButtonPressed()
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onIncomingCallDeclineButtonPressed() { // ... } }
1
onIncomingCallAcceptButtonPressed
-
函数原型:
Untitledfunc onIncomingCallAcceptButtonPressed()
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onIncomingCallAcceptButtonPressed() { // ... } }
1
onOutgoingCallCancelButtonPressed
-
函数原型:
Untitledfunc onOutgoingCallCancelButtonPressed()
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onOutgoingCallCancelButtonPressed() { // ... } }
1
onIncomingCallReceived
-
函数原型:
Untitledfunc onIncomingCallReceived(_ callID: String, caller: ZegoCallUser, callType: ZegoCallType, callees: [ZegoCallUser]?)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onIncomingCallReceived(_ callID: String, caller: ZegoCallUser, callType: ZegoCallType, callees: [ZegoCallUser]?) { // ... } }
1
onIncomingCallCanceled
-
函数原型:
Untitledfunc onIncomingCallCanceled(_ callID: String, caller: ZegoCallUser)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onIncomingCallCanceled(_ callID: String, caller: ZegoCallUser) { // ... } }
1
onOutgoingCallAccepted
-
函数原型:
Untitledfunc onOutgoingCallAccepted(_ callID: String, callee: ZegoCallUser)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onOutgoingCallAccepted(_ callID: String, callee: ZegoCallUser) { // ... } }
1
onOutgoingCallRejectedCauseBusy
-
函数原型:
Untitledfunc onOutgoingCallRejectedCauseBusy(_ callID: String, callee: ZegoCallUser)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onOutgoingCallRejectedCauseBusy(_ callID: String, callee: ZegoCallUser) { // ... } }
1
onOutgoingCallDeclined
-
函数原型:
Untitledfunc onOutgoingCallDeclined(_ callID: String, callee: ZegoCallUser)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onOutgoingCallDeclined(_ callID: String, callee: ZegoCallUser) { // ... } }
1
onIncomingCallTimeout
-
函数原型:
Untitledfunc onIncomingCallTimeout(_ callID: String, caller: ZegoCallUser)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onIncomingCallTimeout(_ callID: String, caller: ZegoCallUser) { // ... } }
1
onOutgoingCallTimeout
-
函数原型:
Untitledfunc onOutgoingCallTimeout(_ callID: String, callees: [ZegoCallUser])
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onOutgoingCallTimeout(_ callID: String, callees: [ZegoCallUser]) { // ... } }
1
onCallTimeUpdate
-
函数原型:
Untitledfunc onCallTimeUpdate(_ duration: Int)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate { func onCallTimeUpdate(_ duration: Int) { // ... } }
1
ZegoUIKitPrebuiltCallVCDelegate
设置代理
Untitled
ZegoUIKitPrebuiltCallInvitationService.shared.callVCDelegate = self
1
getForegroundView
-
函数原型:
Untitledfunc getForegroundView(_ userInfo: ZegoUIKitUser?) -> ZegoBaseAudioVideoForegroundView?
1 -
示例:
Untitled
extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
func getForegroundView(_ userInfo: ZegoUIKitUser?) -> ZegoBaseAudioVideoForegroundView? {
// ...
}
}
1
getMemberListItemView
-
函数原型:
Untitledfunc getMemberListItemView(_ tableView: UITableView, indexPath: IndexPath, userInfo: ZegoUIKitUser) -> UITableViewCell?
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getMemberListItemView(_ tableView: UITableView, indexPath: IndexPath, userInfo: ZegoUIKitUser) -> UITableViewCell? { // ... } }
1
getMemberListviewForHeaderInSection
-
函数原型:
Untitledfunc getMemberListviewForHeaderInSection(_ tableView: UITableView, section: Int) -> UIView?
1 -
示例:
Untitled
extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
func getMemberListviewForHeaderInSection(_ tableView: UITableView, section: Int) -> UIView? {
// ...
}
}
1
getMemberListItemHeight
-
函数原型:
Untitledfunc getMemberListItemHeight(_ userInfo: ZegoUIKitUser) -> CGFloat
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getMemberListItemHeight(_ userInfo: ZegoUIKitUser) -> CGFloat { // ... } }
1
getMemberListHeaderHeight
-
函数原型:
Untitledfunc getMemberListHeaderHeight(_ tableView: UITableView, section: Int) -> CGFloat
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getMemberListHeaderHeight(_ tableView: UITableView, section: Int) -> CGFloat { // ... } }
1
onCallEnd
-
函数原型:
Untitledfunc onCallEnd(_ endEvent: ZegoCallEndEvent)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onCallEnd(_ endEvent: ZegoCallEndEvent) { print("reason: \(String(describing: endEvent.reason)) kickerUserID: \(endEvent.kickerUserID)") } }
1
onToggleMicButtonClick
-
函数原型:
Untitledfunc onToggleMicButtonClick(_ isOn: Bool)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onToggleMicButtonClick(_ isOn: Bool) { // ... } }
1
onToggleCameraButtonClick
-
函数原型:
Untitledfunc onToggleCameraButtonClick(_ isOn: Bool)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onToggleCameraButtonClick(_ isOn: Bool) { // ... } }
1
onSwitchCameraButtonClick
-
函数原型:
Untitledfunc onSwitchCameraButtonClick(_ isFrontFacing: Bool)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onSwitchCameraButtonClick(_ isFrontFacing: Bool) { // ... } }
1
onAudioOutputButtonClick
-
函数原型:
Untitledfunc onAudioOutputButtonClick(_ isSpeaker: Bool)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onAudioOutputButtonClick(_ isSpeaker: Bool) { // ... } }
1
getChatViewItemView
-
函数原型:
Untitledfunc getChatViewItemView(_ tableView: UITableView, indexPath: IndexPath, message: ZegoInRoomMessage) -> UITableViewCell?
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getChatViewItemView(_ tableView: UITableView, indexPath: IndexPath, message: ZegoInRoomMessage) -> UITableViewCell? { // ... } }
1
getChatViewItemHeight
-
函数原型:
Untitledfunc getChatViewItemHeight(_ tableView: UITableView, heightForRowAt indexPath: IndexPath, message: ZegoInRoomMessage) -> CGFloat
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func getChatViewItemHeight(_ tableView: UITableView, heightForRowAt indexPath: IndexPath, message: ZegoInRoomMessage) -> CGFloat { // ... } }
1
onCallTimeUpdate
-
函数原型:
Untitledfunc onCallTimeUpdate(_ duration: Int)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onCallTimeUpdate(_ duration: Int) { // ... } }
1
onAudioOutputDeviceChanged
-
函数原型:
Untitledfunc onAudioOutputDeviceChanged(_ audioOutput: ZegoUIKitAudioOutputDevice)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltCallVCDelegate { func onAudioOutputDeviceChanged(_ audioOutput: ZegoUIKitAudioOutputDevice) { // ... } }
1
ZegoUIKitEventHandle
onIMRecvCustomCommand
当用户收到其他房间用户发送的信令消息时,将会触发此回调。
-
函数原型:
Untitledfunc onIMRecvCustomCommand(_ fromUser: ZegoUIKitUser, command: String)
1 -
示例:
Untitledextension ViewController: ZegoUIKitEventHandle { func onIMRecvCustomCommand(_ fromUser: ZegoUIKitUser, command: String) { } }
1