Event
ZegoUIKitPrebuiltLiveStreamingVCDelegate
getForegroundView
-
函数原型:
Untitledfunc getForegroundView(_ userInfo: ZegoUIKitUser?) -> ZegoBaseAudioVideoForegroundView?
1 -
示例:
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
-
函数原型:
Untitledfunc onLeaveLiveStreaming()
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func onLeaveLiveStreaming() { print("is leave live streaming") //.... } }
1
onLiveStreamingEnded
-
函数原型:
Untitledfunc onLiveStreamingEnded()
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func onLiveStreamingEnded() { print("live streaming is end") //.... } }
1
onStartLiveButtonPressed
-
函数原型:
Untitledfunc onStartLiveButtonPressed()
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func onStartLiveButtonPressed() { print("start live button is click") //.... } }
1
getPKBattleTopView
-
函数原型:
Untitledfunc getPKBattleTopView(_ parentView: UIView, userList: [ZegoUIKitUser]) -> UIView?
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func getPKBattleTopView(_ parentView: UIView, userList: [ZegoUIKitUser]) -> UIView? { let view = UIView() view.backgroundColor = UIColor.red return view } }
1
getPKBattleForegroundView
-
函数原型:
Untitledfunc getPKBattleForegroundView(_ parentView: UIView, userInfo: ZegoUIKitUser) -> UIView?
1 -
示例:
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
-
函数原型:
Untitledfunc getPKBattleBottomView(_ parentView: UIView, userList: [ZegoUIKitUser]) -> UIView?
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func getPKBattleBottomView(_ parentView: UIView, userList: [ZegoUIKitUser]) -> UIView? { let view = UIView() view.backgroundColor = UIColor.red return view } }
1
onInRoomMessageClick
-
函数原型:
Untitledfunc onInRoomMessageClick(_ message: ZegoInRoomMessage)
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func onInRoomMessageClick(_ message: ZegoInRoomMessage) { // ... // ZegoInRoomMessage 具有以下属性 // public var message: String? // public var messageID: Int64 = 0 // public var sendTime: UInt64 = 0 // public var user: ZegoUIKitUser? } }
1
onIMRecvBarrageMessage
-
函数原型:
Untitledfunc onIMRecvBarrageMessage(_ roomID: String, messageList: [ZegoUIKitBarrageMessageInfo])
1 -
示例:
Untitledextension ViewController: ZegoUIKitPrebuiltLiveStreamingVCDelegate { func func onIMRecvBarrageMessage(_ roomID: String, messageList: [ZegoUIKitBarrageMessageInfo]) { // ... // ZegoInRoomMessage 具有以下属性 // public var message: String? // public var messageID: String? // public var sendTime: CUnsignedLongLong = 0 // public var user: ZegoUIKitUser? } }
1
ZegoLiveStreamingManagerDelegate
onIncomingCohostRequest
-
函数原型:
Untitledfunc onIncomingCohostRequest(inviter: ZegoUIKitUser)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCohostRequest(inviter: ZegoUIKitUser) { //... } }
1
onIncomingInviteToCohostRequest
-
函数原型:
Untitledfunc onIncomingInviteToCohostRequest(inviter: ZegoUIKitUser, invitationID: String)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingInviteToCohostRequest(inviter: ZegoUIKitUser, invitationID: String) { //... } }
1
onIncomingRemoveCohostRequest
-
函数原型:
Untitledfunc onIncomingRemoveCohostRequest(inviter: ZegoUIKitUser)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingRemoveCohostRequest(inviter: ZegoUIKitUser) { //... } }
1
onIncomingAcceptCohostRequest
-
函数原型:
Untitledfunc onIncomingAcceptCohostRequest(invitee: ZegoUIKitUser, data: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingAcceptCohostRequest(invitee: ZegoUIKitUser, data: String?) { //... } }
1
onIncomingCancelCohostRequest
-
函数原型:
Untitledfunc onIncomingCancelCohostRequest(inviter: ZegoUIKitUser, data: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCancelCohostRequest(inviter: ZegoUIKitUser, data: String?) { //... } }
1
onIncomingRefuseCohostRequest
-
函数原型:
Untitledfunc onIncomingRefuseCohostRequest(invitee: ZegoUIKitUser, data: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingRefuseCohostRequest(invitee: ZegoUIKitUser, data: String?) { // ... } }
1
onIncomingRefuseCohostInvite
-
函数原型:
Untitledfunc onIncomingRefuseCohostInvite(invitee: ZegoUIKitUser, data: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingRefuseCohostInvite(invitee: ZegoUIKitUser, data: String?) { // ... } }
1
onIncomingCohostRequestTimeOut
-
函数原型:
Untitledfunc onIncomingCohostRequestTimeOut(inviter: ZegoUIKitUser, data: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCohostRequestTimeOut(inviter: ZegoUIKitUser, data: String?) { // ... } }
1
onIncomingCohostInviteTimeOut
-
函数原型:
Untitledfunc onIncomingCohostInviteTimeOut(inviter: ZegoUIKitUser, data: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCohostInviteTimeOut(inviter: ZegoUIKitUser, data: String?) { //... } }
1
onIncomingCohostInviteResponseTimeOut
-
函数原型:
Untitledfunc onIncomingCohostInviteResponseTimeOut(invitees: [ZegoUIKitUser], data: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCohostInviteResponseTimeOut(invitees: [ZegoUIKitUser], data: String?) { //... } }
1
onIncomingCohostRequestResponseTimeOut
-
函数原型:
Untitledfunc onIncomingCohostInviteResponseTimeOut(invitees: [ZegoUIKitUser], data: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingCohostInviteResponseTimeOut(invitees: [ZegoUIKitUser], data: String?) { //... } }
1
onIncomingPKRequestReceived
-
函数原型:
Untitledfunc onIncomingPKRequestReceived(requestID: String, anotherHostUser: ZegoUIKitUser, anotherHostLiveID: String, customData: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingPKRequestReceived(requestID: String, anotherHostUser: ZegoUIKitUser, anotherHostLiveID: String, customData: String?) { //... } }
1
onIncomingResumePKRequestReceived
-
函数原型:
Untitledfunc onIncomingResumePKRequestReceived(requestID: String)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingResumePKRequestReceived(requestID: String) { //... } }
1
onIncomingPKRequestCancelled
-
函数原型:
Untitledfunc onIncomingPKRequestCancelled(anotherHostLiveID: String, anotherHostUser: ZegoUIKitUser, customData: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingPKRequestCancelled(anotherHostLiveID: String, anotherHostUser: ZegoUIKitUser, customData: String?) { //... } }
1
onOutgoingPKRequestAccepted
-
函数原型:
Untitledfunc onOutgoingPKRequestAccepted(anotherHostLiveID: String, anotherHostUser: ZegoUIKitUser, customData: String?)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onOutgoingPKRequestAccepted(anotherHostLiveID: String, anotherHostUser: ZegoUIKitUser, customData: String?) { //... } }
1
onOutgoingPKRequestRejected
-
函数原型:
Untitledfunc onOutgoingPKRequestRejected(reason: Int, anotherHostUser: ZegoUIKitUser)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onOutgoingPKRequestRejected(reason: Int, anotherHostUser: ZegoUIKitUser) { //... } }
1
onIncomingPKRequestTimeout
-
函数原型:
Untitledfunc onIncomingPKRequestTimeout(requestID: String, anotherHostUser: ZegoUIKitUser)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onIncomingPKRequestTimeout(requestID: String, anotherHostUser: ZegoUIKitUser) { //... } }
1
onOutgoingPKRequestTimeout
-
函数原型:
Untitledfunc onOutgoingPKRequestTimeout(requestID: String, anotherHost: ZegoUIKitUser)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onOutgoingPKRequestTimeout(requestID: String, anotherHost: ZegoUIKitUser) { //... } }
1
onPKStarted
-
函数原型:
Untitledfunc onPKStarted(roomID: String, userID: String)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onPKStarted(roomID: String, userID: String) { //... } }
1
onPKEnded
-
函数原型:
Untitledfunc onPKEnded()
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onPKEnded() { //... } }
1
onPKViewAvaliable
-
函数原型:
Untitledfunc onPKViewAvaliable()
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onPKViewAvaliable() { //... } }
1
onLocalHostCameraStatus
-
函数原型:
Untitledfunc onLocalHostCameraStatus(isOn: Bool)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onLocalHostCameraStatus(isOn: Bool) { //... } }
1
onAnotherHostCameraStatus
-
函数原型:
Untitledfunc onAnotherHostCameraStatus(isOn: Bool)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onAnotherHostCameraStatus(isOn: Bool) { //... } }
1
onAnotherHostIsReconnecting
-
函数原型:
Untitledfunc onAnotherHostIsReconnecting()
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onAnotherHostIsReconnecting() { //... } }
1
onAnotherHostIsConnected
-
函数原型:
Untitledfunc onAnotherHostIsConnected()
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onAnotherHostIsConnected() { //... } }
1
onHostIsReconnecting
-
函数原型:
Untitledfunc onHostIsReconnecting()
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onHostIsReconnecting() { //... } }
1
onHostIsConnected
-
函数原型:
Untitledfunc onHostIsConnected()
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onHostIsConnected() { //... } }
1
onMixerStreamTaskFail
-
函数原型:
Untitledfunc onMixerStreamTaskFail(errorCode: Int)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onMixerStreamTaskFail(errorCode: Int) { //... } }
1
onStartPlayMixerStream
-
函数原型:
Untitledfunc onStartPlayMixerStream()
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onStartPlayMixerStream() { //... } }
1
onStopPlayMixerStream
-
函数原型:
Untitledfunc onStopPlayMixerStream()
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onStopPlayMixerStream() { //... } }
1
onOtherHostMuted
-
函数原型:
Untitledfunc onOtherHostMuted(userID: String, mute: Bool)
1 -
示例:
Untitledextension ViewController: ZegoLiveStreamingManagerDelegate { func onOtherHostMuted(userID: String, mute: Bool) { //... } }
1