Event
ZegoUIKitPrebuiltLiveStreamingVCDelegate
getForegroundView
- function prototype:
Untitledfunc getForegroundView(_ userInfo: ZegoUIKitUser?) -> ZegoBaseAudioVideoForegroundView?
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func getForegroundView(_ userInfo: ZegoUIKitUser?) -> ZegoBaseAudioVideoForegroundView? { let view = ZegoBaseAudioVideoForegroundView(frame: CGRect(x: 0, y: 0, width: 100, height: 100), userID: userInfo?.userID, delegate: nil) //... return view } }
1
onLeaveLiveStreaming
- function prototype:
Untitledfunc onLeaveLiveStreaming()
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func onLeaveLiveStreaming() { print("is leave live streaming") //.... } }
1
onLiveStreamingEnded
- function prototype:
Untitledfunc onLiveStreamingEnded()
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func onLiveStreamingEnded() { print("live streaming is end") //.... } }
1
onStartLiveButtonPressed
- function prototype:
Untitledfunc onStartLiveButtonPressed()
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func onStartLiveButtonPressed() { print("start live button is click") //.... } }
1
getPKBattleTopView
- function prototype:
Untitledfunc getPKBattleTopView(_ parentView: UIView, userList: [ZegoUIKitUser]) -> UIView?
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func getPKBattleTopView(_ parentView: UIView, userList: [ZegoUIKitUser]) -> UIView? { let view = UIView() view.backgroundColor = UIColor.red return view } }
1
getPKBattleForegroundView
- function prototype:
Untitledfunc getPKBattleForegroundView(_ parentView: UIView, userInfo: ZegoUIKitUser) -> UIView?
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func getPKBattleForegroundView(_ parentView: UIView, userInfo: ZegoUIKitUser) -> UIView? { let view = UIView() let button: MutePKUserButton = MutePKUserButton() button.frame = CGRect(x: 30, y: 30, width: 80, height: 40) view.addSubview(button) return view } }
1
getPKBattleBottomView
- function prototype:
Untitledfunc getPKBattleBottomView(_ parentView: UIView, userList: [ZegoUIKitUser]) -> UIView?
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func getPKBattleBottomView(_ parentView: UIView, userList: [ZegoUIKitUser]) -> UIView? { let view = UIView() view.backgroundColor = UIColor.red return view } }
1
onInRoomMessageClick
- function prototype:
Untitledfunc onInRoomMessageClick(_ message: ZegoInRoomMessage)
1
- example:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func onInRoomMessageClick(_ message: ZegoInRoomMessage) { // ... // ZegoInRoomMessage has these property // public var message: String? // public var messageID: Int64 = 0 // public var sendTime: UInt64 = 0 // public var user: ZegoUIKitUser? } }
1
onIMRecvBarrageMessage
-
function prototype:
Untitledfunc onIMRecvBarrageMessage(_ roomID: String, messageList: [ZegoUIKitBarrageMessageInfo])
1 -
example:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func func onIMRecvBarrageMessage(_ roomID: String, messageList: [ZegoUIKitBarrageMessageInfo]) { // ... // ZegoInRoomMessage has the following properties: // public var message: String? // public var messageID: String? // public var sendTime: CUnsignedLongLong = 0 // public var user: ZegoUIKitUser? } }
1
ZegoLiveStreamingManagerDelegate
onIncomingCohostRequest
- function prototype:
Untitledfunc onIncomingCohostRequest(inviter: ZegoUIKitUser)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCohostRequest(inviter: ZegoUIKitUser) { //... } }
1
onIncomingInviteToCohostRequest
- function prototype:
Untitledfunc onIncomingInviteToCohostRequest(inviter: ZegoUIKitUser, invitationID: String)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingInviteToCohostRequest(inviter: ZegoUIKitUser, invitationID: String) { //... } }
1
onIncomingRemoveCohostRequest
- function prototype:
Untitledfunc onIncomingRemoveCohostRequest(inviter: ZegoUIKitUser)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingRemoveCohostRequest(inviter: ZegoUIKitUser) { //... } }
1
onIncomingAcceptCohostRequest
- function prototype:
Untitledfunc onIncomingAcceptCohostRequest(invitee: ZegoUIKitUser, data: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingAcceptCohostRequest(invitee: ZegoUIKitUser, data: String?) { //... } }
1
onIncomingCancelCohostRequest
- function prototype:
Untitledfunc onIncomingCancelCohostRequest(inviter: ZegoUIKitUser, data: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCancelCohostRequest(inviter: ZegoUIKitUser, data: String?) { //... } }
1
onIncomingCancelCohostInvite
- function prototype:
Untitledfunc onIncomingCancelCohostInvite(inviter: ZegoUIKitUser, data: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCancelCohostInvite(inviter: ZegoUIKitUser, data: String?) { //... } }
1
onIncomingRefuseCohostRequest
- function prototype:
Untitledfunc onIncomingRefuseCohostRequest(invitee: ZegoUIKitUser, data: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingRefuseCohostRequest(invitee: ZegoUIKitUser, data: String?) { //... } }
1
onIncomingRefuseCohostInvite
- function prototype:
Untitledfunc onIncomingRefuseCohostInvite(invitee: ZegoUIKitUser, data: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingRefuseCohostInvite(invitee: ZegoUIKitUser, data: String?) { //... } }
1
onIncomingCohostRequestTimeOut
- function prototype:
Untitledfunc onIncomingCohostRequestTimeOut(inviter: ZegoUIKitUser, data: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCohostRequestTimeOut(inviter: ZegoUIKitUser, data: String?) { //... } }
1
onIncomingCohostInviteTimeOut
- function prototype:
Untitledfunc onIncomingCohostInviteTimeOut(inviter: ZegoUIKitUser, data: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCohostInviteTimeOut(inviter: ZegoUIKitUser, data: String?) { //... } }
1
onIncomingCohostInviteResponseTimeOut
- function prototype:
Untitledfunc onIncomingCohostInviteResponseTimeOut(invitees: [ZegoUIKitUser], data: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCohostInviteResponseTimeOut(invitees: [ZegoUIKitUser], data: String?) { //... } }
1
onIncomingCohostRequestResponseTimeOut
- function prototype:
Untitledfunc onIncomingCohostInviteResponseTimeOut(invitees: [ZegoUIKitUser], data: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCohostInviteResponseTimeOut(invitees: [ZegoUIKitUser], data: String?) { //... } }
1
onIncomingPKRequestReceived
- function prototype:
Untitledfunc onIncomingPKRequestReceived(requestID: String, anotherHostUser: ZegoUIKitUser, anotherHostLiveID: String, customData: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingPKRequestReceived(requestID: String, anotherHostUser: ZegoUIKitUser, anotherHostLiveID: String, customData: String?) { //... } }
1
onIncomingResumePKRequestReceived
- function prototype:
Untitledfunc onIncomingResumePKRequestReceived(requestID: String)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingResumePKRequestReceived(requestID: String) { //... } }
1
onIncomingPKRequestCancelled
- function prototype:
Untitledfunc onIncomingPKRequestCancelled(anotherHostLiveID: String, anotherHostUser: ZegoUIKitUser, customData: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingPKRequestCancelled(anotherHostLiveID: String, anotherHostUser: ZegoUIKitUser, customData: String?) { //... } }
1
onOutgoingPKRequestAccepted
- function prototype:
Untitledfunc onOutgoingPKRequestAccepted(anotherHostLiveID: String, anotherHostUser: ZegoUIKitUser, customData: String?)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onOutgoingPKRequestAccepted(anotherHostLiveID: String, anotherHostUser: ZegoUIKitUser, customData: String?) { //... } }
1
onOutgoingPKRequestRejected
- function prototype:
Untitledfunc onOutgoingPKRequestRejected(reason: Int, anotherHostUser: ZegoUIKitUser)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onOutgoingPKRequestRejected(reason: Int, anotherHostUser: ZegoUIKitUser) { //... } }
1
onIncomingPKRequestTimeout
- function prototype:
Untitledfunc onIncomingPKRequestTimeout(requestID: String, anotherHostUser: ZegoUIKitUser)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingPKRequestTimeout(requestID: String, anotherHostUser: ZegoUIKitUser) { //... } }
1
onOutgoingPKRequestTimeout
- function prototype:
Untitledfunc onOutgoingPKRequestTimeout(requestID: String, anotherHost: ZegoUIKitUser)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onOutgoingPKRequestTimeout(requestID: String, anotherHost: ZegoUIKitUser) { //... } }
1
onPKStarted
- function prototype:
Untitledfunc onPKStarted(roomID: String, userID: String)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onPKStarted(roomID: String, userID: String) { //... } }
1
onPKEnded
- function prototype:
Untitledfunc onPKEnded()
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onPKEnded() { //... } }
1
onPKViewAvaliable
- function prototype:
Untitledfunc onPKViewAvaliable()
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onPKViewAvaliable() { //... } }
1
onLocalHostCameraStatus
- function prototype:
Untitledfunc onLocalHostCameraStatus(isOn: Bool)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onLocalHostCameraStatus(isOn: Bool) { //... } }
1
onAnotherHostCameraStatus
- function prototype:
Untitledfunc onAnotherHostCameraStatus(isOn: Bool)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onAnotherHostCameraStatus(isOn: Bool) { //... } }
1
onAnotherHostIsReconnecting
- function prototype:
Untitledfunc onAnotherHostIsReconnecting()
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onAnotherHostIsReconnecting() { //... } }
1
onAnotherHostIsConnected
- function prototype:
Untitledfunc onAnotherHostIsConnected()
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onAnotherHostIsConnected() { //... } }
1
onHostIsReconnecting
- function prototype:
Untitledfunc onHostIsReconnecting()
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onHostIsReconnecting() { //... } }
1
onHostIsConnected
- function prototype:
Untitledfunc onHostIsConnected()
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onHostIsConnected() { //... } }
1
onMixerStreamTaskFail
- function prototype:
Untitledfunc onMixerStreamTaskFail(errorCode: Int)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onMixerStreamTaskFail(errorCode: Int) { //... } }
1
onStartPlayMixerStream
- function prototype:
Untitledfunc onStartPlayMixerStream()
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onStartPlayMixerStream() { //... } }
1
onStopPlayMixerStream
- function prototype:
Untitledfunc onStopPlayMixerStream()
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onStopPlayMixerStream() { //... } }
1
onOtherHostMuted
- function prototype:
Untitledfunc onOtherHostMuted(userID: String, mute: Bool)
1
- example:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onOtherHostMuted(userID: String, mute: Bool) { //... } }
1