Package 

Interface Room.Listener


  • 
    public interface Room.Listener
    
                        

    Listener definition of room related events.

    • Method Detail

      • onConnected

         abstract void onConnected(@NonNull() Room room)

        Called when a room has succeeded.

        Parameters:
        room - the connected room.
      • onConnectFailure

         abstract void onConnectFailure(@NonNull() Room room, @NonNull() TwilioException twilioException)

        Called when a connection to a room failed.

        Parameters:
        room - the room that failed to be connected to.
        twilioException - an exception describing why connect failed.
      • onReconnecting

         abstract void onReconnecting(@NonNull() Room room, @NonNull() TwilioException twilioException)

        Called when the LocalParticipant has experienced a network disruption and theclient begins trying to reestablish a connection to a room.

        The SDK groups network disruptions into two categories: signaling and media. Theoccurrence of either of these network disruptions will result in the onReconnectingcallback. During a media reconnection signaling related methods may continue to beinvoked.

        Parameters:
        room - the room the LocalParticipant is attempting to reconnect to.
        twilioException - An error explaining why the LocalParticipant isreconnecting to a room.
      • onDisconnected

         abstract void onDisconnected(@NonNull() Room room, @Nullable() TwilioException twilioException)

        Called when a room has been disconnected from.

        Parameters:
        room - the room that was disconnected from.
        twilioException - An exception if there was a problem that caused the room to bedisconnected from.
      • onParticipantConnected

         abstract void onParticipantConnected(@NonNull() Room room, @NonNull() RemoteParticipant remoteParticipant)

        Called when a participant has connected to a room.

        Parameters:
        room - the room the participant connected to.
        remoteParticipant - the newly connected participant.
      • onParticipantDisconnected

         abstract void onParticipantDisconnected(@NonNull() Room room, @NonNull() RemoteParticipant remoteParticipant)

        Called when a participant has disconnected from a room. The disconnected participant'saudio and video tracks will still be available in their last known state. Video trackssinks are removed when a participant is disconnected.

        Parameters:
        room - the room the participant disconnected from.
        remoteParticipant - the disconnected participant.
      • onParticipantReconnecting

         void onParticipantReconnecting(@NonNull() Room room, @NonNull() RemoteParticipant remoteParticipant)

        Called when a participant is reconnecting to the room after a signaling connectiondisruption.

        Note: It can take up to 15 seconds for our signaling backend to detect that aRemoteParticipant's connection has been disrupted due to a network degradation orhandoff.

        Parameters:
        room - the room the participant is reconnecting to.
        remoteParticipant - the reconnecting participant.
      • onParticipantReconnected

         void onParticipantReconnected(@NonNull() Room room, @NonNull() RemoteParticipant remoteParticipant)

        Called when a participant has reconnected to the room after a signaling connectiondisruption.

        Parameters:
        room - the room the participant has reconnected to.
        remoteParticipant - the reconnected participant.
      • onDominantSpeakerChanged

         void onDominantSpeakerChanged(@NonNull() Room room, @Nullable() RemoteParticipant remoteParticipant)

        This method is called when the dominant speaker in the Room changes. Either thereis a new dominant speaker, in which case getDominantSpeaker returns the RemoteParticipant included in the event or there is no longer a dominant speaker,in which case getDominantSpeaker returns {@code null}.

        This method will not be called when one of the following conditions are true:

        • The Room topology is P2P.
        • The dominant speaker feature was not enabled via
        Parameters:
        room - The Room in which the dominant speaker changed.
        remoteParticipant - The RemoteParticipant that is currently the dominantspeaker or {@code null}.
      • onRecordingStarted

         abstract void onRecordingStarted(@NonNull() Room room)

        This method is only called when a Room which was not previously recording startsrecording. If you've joined a Room which is already recording this event will notbe fired.

      • onRecordingStopped

         abstract void onRecordingStopped(@NonNull() Room room)

        This method is only called when a Room which was previously recording stopsrecording. If you've joined a Room which is not recording this event will not befired.

      • onTranscription

         void onTranscription(@NonNull() Room room, @NonNull() JSONObject json)

        This method is called when Real-Time Transcriptions are available in a Group Room.Receiving Real-Time Transcriptions must be enabled by setting receiveTranscriptions(true)in ConnectOptions.

        Parameters:
        room - The Room in which the Real-Time Transcriptions are available.
        json - A JSONObject That contains transcription data as key value pairs.