logo
当前页

Event

ZegoUIKitPrebuiltCallInvitationServiceDelegate

设置代理

Untitled
ZegoUIKitPrebuiltCallInvitationService.shared.delegate = self
1
Copied!

requireConfig

  • 函数原型:

    Untitled
    func requireConfig(_ data: ZegoCallInvitationData) -> ZegoUIKitPrebuiltCallConfig
    
    1
    Copied!
  • 示例:

    Untitled
    extension 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
    Copied!

onIncomingCallDeclineButtonPressed

  • 函数原型:

    Untitled
    func onIncomingCallDeclineButtonPressed()
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onIncomingCallDeclineButtonPressed() {
            // ...
        }
    }
    
    1
    Copied!

onIncomingCallAcceptButtonPressed

  • 函数原型:

    Untitled
    func onIncomingCallAcceptButtonPressed()
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onIncomingCallAcceptButtonPressed() {
            // ...
        }
    }
    
    1
    Copied!

onOutgoingCallCancelButtonPressed

  • 函数原型:

    Untitled
    func onOutgoingCallCancelButtonPressed()
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onOutgoingCallCancelButtonPressed() {
            // ...
        }
    }
    
    1
    Copied!

onIncomingCallReceived

  • 函数原型:

    Untitled
    func onIncomingCallReceived(_ callID: String, caller: ZegoCallUser, callType: ZegoCallType, callees: [ZegoCallUser]?)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onIncomingCallReceived(_ callID: String, caller: ZegoCallUser, callType: ZegoCallType, callees: [ZegoCallUser]?) {
            // ...
        }
    }
    
    1
    Copied!

onIncomingCallCanceled

  • 函数原型:

    Untitled
    func onIncomingCallCanceled(_ callID: String, caller: ZegoCallUser)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onIncomingCallCanceled(_ callID: String, caller: ZegoCallUser) {
            // ...
        }
    }
    
    1
    Copied!

onOutgoingCallAccepted

  • 函数原型:

    Untitled
    func onOutgoingCallAccepted(_ callID: String, callee: ZegoCallUser)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onOutgoingCallAccepted(_ callID: String, callee: ZegoCallUser) {
            // ...
        }
    }
    
    1
    Copied!

onOutgoingCallRejectedCauseBusy

  • 函数原型:

    Untitled
    func onOutgoingCallRejectedCauseBusy(_ callID: String, callee: ZegoCallUser)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onOutgoingCallRejectedCauseBusy(_ callID: String, callee: ZegoCallUser) {
            // ...
        }
    }
    
    1
    Copied!

onOutgoingCallDeclined

  • 函数原型:

    Untitled
    func onOutgoingCallDeclined(_ callID: String, callee: ZegoCallUser)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onOutgoingCallDeclined(_ callID: String, callee: ZegoCallUser) {
            // ...
        }
    }
    
    1
    Copied!

onIncomingCallTimeout

  • 函数原型:

    Untitled
    func onIncomingCallTimeout(_ callID: String, caller: ZegoCallUser)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onIncomingCallTimeout(_ callID: String, caller: ZegoCallUser) {
            // ...
        }
    }
    
    1
    Copied!

onOutgoingCallTimeout

  • 函数原型:

    Untitled
    func onOutgoingCallTimeout(_ callID: String, callees: [ZegoCallUser])
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onOutgoingCallTimeout(_ callID: String, callees: [ZegoCallUser]) {
            // ...
        }
    }
    
    1
    Copied!

onCallTimeUpdate

  • 函数原型:

    Untitled
    func onCallTimeUpdate(_ duration: Int)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallInvitationServiceDelegate {
        func onCallTimeUpdate(_ duration: Int) {
            // ...
        }
    }
    
    1
    Copied!

ZegoUIKitPrebuiltCallVCDelegate

设置代理

Untitled
ZegoUIKitPrebuiltCallInvitationService.shared.callVCDelegate = self
1
Copied!

getForegroundView

  • 函数原型:

    Untitled
    func getForegroundView(_ userInfo: ZegoUIKitUser?) -> ZegoBaseAudioVideoForegroundView?
    
    1
    Copied!
  • 示例:

Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func getForegroundView(_ userInfo: ZegoUIKitUser?) -> ZegoBaseAudioVideoForegroundView? {
            // ...
        }
    }
1
Copied!

getMemberListItemView

  • 函数原型:

    Untitled
    func getMemberListItemView(_ tableView: UITableView, indexPath: IndexPath, userInfo: ZegoUIKitUser) -> UITableViewCell?
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func getMemberListItemView(_ tableView: UITableView, indexPath: IndexPath, userInfo: ZegoUIKitUser) -> UITableViewCell? {
            // ...
        }
    }
    
    1
    Copied!

getMemberListviewForHeaderInSection

  • 函数原型:

    Untitled
    func getMemberListviewForHeaderInSection(_ tableView: UITableView, section: Int) -> UIView?
    
    1
    Copied!
  • 示例:

Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func getMemberListviewForHeaderInSection(_ tableView: UITableView, section: Int) -> UIView? {
            // ...
        }
    }
1
Copied!

getMemberListItemHeight

  • 函数原型:

    Untitled
    func getMemberListItemHeight(_ userInfo: ZegoUIKitUser) -> CGFloat
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func getMemberListItemHeight(_ userInfo: ZegoUIKitUser) -> CGFloat {
            // ...
        }
    }
    
    1
    Copied!

getMemberListHeaderHeight

  • 函数原型:

    Untitled
    func getMemberListHeaderHeight(_ tableView: UITableView, section: Int) -> CGFloat
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func getMemberListHeaderHeight(_ tableView: UITableView, section: Int) -> CGFloat {
            // ...
        }
    }
    
    1
    Copied!

onCallEnd

  • 函数原型:

    Untitled
    func onCallEnd(_ endEvent: ZegoCallEndEvent)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
    func onCallEnd(_ endEvent: ZegoCallEndEvent) {
      print("reason: \(String(describing: endEvent.reason)) kickerUserID: \(endEvent.kickerUserID)")
    }
    }
    
    1
    Copied!

onToggleMicButtonClick

  • 函数原型:

    Untitled
    func onToggleMicButtonClick(_ isOn: Bool)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func onToggleMicButtonClick(_ isOn: Bool) {
            // ...
        }
    }
    
    1
    Copied!

onToggleCameraButtonClick

  • 函数原型:

    Untitled
    func onToggleCameraButtonClick(_ isOn: Bool)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func onToggleCameraButtonClick(_ isOn: Bool) {
            // ...
        }
    }
    
    1
    Copied!

onSwitchCameraButtonClick

  • 函数原型:

    Untitled
    func onSwitchCameraButtonClick(_ isFrontFacing: Bool)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func onSwitchCameraButtonClick(_ isFrontFacing: Bool) {
            // ...
        }
    }
    
    1
    Copied!

onAudioOutputButtonClick

  • 函数原型:

    Untitled
    func onAudioOutputButtonClick(_ isSpeaker: Bool)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func onAudioOutputButtonClick(_ isSpeaker: Bool) {
            // ...
        }
    }
    
    1
    Copied!

getChatViewItemView

  • 函数原型:

    Untitled
    func getChatViewItemView(_ tableView: UITableView, indexPath: IndexPath, message: ZegoInRoomMessage) -> UITableViewCell?
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func getChatViewItemView(_ tableView: UITableView, indexPath: IndexPath, message: ZegoInRoomMessage) -> UITableViewCell? {
            // ...
        }
    }
    
    1
    Copied!

getChatViewItemHeight

  • 函数原型:

    Untitled
    func getChatViewItemHeight(_ tableView: UITableView, heightForRowAt indexPath: IndexPath, message: ZegoInRoomMessage) -> CGFloat
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func getChatViewItemHeight(_ tableView: UITableView, heightForRowAt indexPath: IndexPath, message: ZegoInRoomMessage) -> CGFloat {
            // ...
        }
    }
    
    1
    Copied!

onCallTimeUpdate

  • 函数原型:

    Untitled
    func onCallTimeUpdate(_ duration: Int)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func onCallTimeUpdate(_ duration: Int) {
            // ...
        }
    }
    
    1
    Copied!

onAudioOutputDeviceChanged

  • 函数原型:

    Untitled
    func onAudioOutputDeviceChanged(_ audioOutput: ZegoUIKitAudioOutputDevice)
    
    1
    Copied!
  • 示例:

    Untitled
    extension ViewController: ZegoUIKitPrebuiltCallVCDelegate {
        func onAudioOutputDeviceChanged(_ audioOutput: ZegoUIKitAudioOutputDevice) {
            // ...
        }
    }
    
    1
    Copied!

Previous

API

Next

Config