logo
当前页

Event

ZegoTurnOnYourMicrophoneRequestListener

onTurnOnYourMicrophoneRequest

当其他用户尝试打开您的麦克风时,将触发此回调。

  • 函数原型:

    Untitled
    void onTurnOnYourMicrophoneRequest(ZegoUIKitUser fromUser)
    
    1
    Copied!
  • 示例:

    Untitled
    ZegoUIKitPrebuiltLiveAudioRoomFragment fragment;
    // ...
    fragment.setTurnOnYourMicrophoneRequestListener(new ZegoTurnOnYourMicrophoneRequestListener() {
        @Override
        public void onTurnOnYourMicrophoneRequest(ZegoUIKitUser fromUser) {
          
        }
    });
    
    1
    Copied!

ZegoUserCountOrPropertyChangedListener

onUserCountOrPropertyChanged

当房间用户数量变化或属性变化时,将触发此回调。

  • 函数原型:

    Untitled
    void onUserCountOrPropertyChanged(List<ZegoUIKitUser> userList)
    
    1
    Copied!
  • 示例:

    Untitled
    ZegoUIKitPrebuiltLiveAudioRoomFragment fragment;
    // ...
    fragment.setUserCountOrPropertyChangedListener(new ZegoUserCountOrPropertyChangedListener() {
        @Override
        public void onUserCountOrPropertyChanged(List<ZegoUIKitUser> userList) {
            
        }
    });
    
    1
    Copied!

ZegoSeatTakingRequestAudienceListener

onSeatTakingRequestRejected

当房间主持人拒绝观众的座位占用请求时,观众将收到此回调。

  • 函数原型:

    Untitled
    void onSeatTakingRequestRejected()
    
    1
    Copied!
  • 示例:

    Untitled
    ZegoUIKitPrebuiltLiveAudioRoomFragment fragment;
    // ...
    fragment.setSeatTakingRequestAudienceListener(new ZegoSeatTakingRequestAudienceListener() {
        @Override
        public void onSeatTakingRequestRejected() {
            
        }
    });
    
    1
    Copied!

onHostSeatTakingInviteSent

当房间主持人邀请用户成为发言人时,观众将收到此回调。

  • 函数原型:

    Untitled
    void onHostSeatTakingInviteSent()
    
    1
    Copied!
  • 示例:

    Untitled
    ZegoUIKitPrebuiltLiveAudioRoomFragment fragment;
    // ...
    fragment.setSeatTakingRequestAudienceListener(new ZegoSeatTakingRequestAudienceListener() {
        @Override
        public void onHostSeatTakingInviteSent() {
            
        }
    });
    
    1
    Copied!

ZegoSeatTakingRequestHostListener

onSeatTakingRequested

当房间主持人收到用户成为发言人的请求时,将触发此回调。

  • 函数原型:

    Untitled
    onSeatTakingRequested(ZegoUIKitUser audience)
    
    1
    Copied!
  • 示例:

    Untitled
    ZegoUIKitPrebuiltLiveAudioRoomFragment fragment;
    // ...
    fragment.setSeatTakingRequestHostListener(new setSeatTakingRequestHostListener() {
        @Override
        public void onSeatTakingRequested(ZegoUIKitUser audience) {
            
        }
    });
    
    1
    Copied!

onSeatTakingRequestCancelled

当房间主持人收到观众成为发言人的请求,然后取消请求时,将触发此回调。

  • 函数原型:

    Untitled
    onSeatTakingRequestCancelled(ZegoUIKitUser audience)
    
    1
    Copied!
  • 示例:

    Untitled
    ZegoUIKitPrebuiltLiveAudioRoomFragment fragment;
    // ...
    fragment.setSeatTakingRequestHostListener(new setSeatTakingRequestHostListener() {
        @Override
        public void onSeatTakingRequestCancelled(ZegoUIKitUser audience) {
            
        }
    });
    
    1
    Copied!

onSeatTakingInviteRejected

当房间主持人邀请观众成为发言人,然后被观众拒绝时,将触发此回调。

  • 函数原型:

    Untitled
    onSeatTakingInviteRejected()
    
    1
    Copied!
  • 示例:

    Untitled
    ZegoUIKitPrebuiltLiveAudioRoomFragment fragment;
    // ...
    fragment.setSeatTakingRequestHostListener(new setSeatTakingRequestHostListener() {
        @Override
        public void onSeatTakingInviteRejected() {
            
        }
    });
    
    1
    Copied!

ZegoSeatsChangedListener

onSeatsChanged

当房间发言人变化时,将触发此回调。

  • 函数原型:

    Untitled
    void onSeatsChanged(Map<Integer, ZegoUIKitUser> takenSeats, List<Integer> untakenSeats)
    
    1
    Copied!
  • 示例:

    Untitled
    ZegoUIKitPrebuiltLiveAudioRoomFragment fragment;
    // ...
    fragment.setSeatsChangedListener(new ZegoSeatsChangedListener() {
        @Override
        public void onSeatsChanged(Map<Integer, ZegoUIKitUser> takenSeats, List<Integer> untakenSeats) {
            
        }
    });
    
    1
    Copied!

ZegoSeatsClosedListener

onSeatsClosed

当房间主持人关闭所有座位时,将触发此回调。

  • 函数原型:

    Untitled
    void onSeatsClosed()
    
    1
    Copied!
  • 示例:

    Untitled
    ZegoUIKitPrebuiltLiveAudioRoomFragment fragment;
    // ...
    fragment.setSeatsClosedListener(new ZegoSeatsClosedListener() {
        @Override
        public void onSeatsClosed() {
            
        }
    });
    
    1
    Copied!

onSeatsOpened

当房间主持人打开所有座位时,将触发此回调。

  • 函数原型:

    Untitled
    void onSeatsOpened()
    
    1
    Copied!
  • 示例:

    Untitled
    ZegoUIKitPrebuiltLiveAudioRoomFragment fragment;
    // ...
    fragment.setSeatsClosedListener(new ZegoSeatsClosedListener() {
        @Override
        public void onSeatsOpened() {
            
        }
    });
    
    1
    Copied!

Previous

API

Next

Config