Interface LocalParticipant.Listener

Enclosing class:
LocalParticipant

public static interface LocalParticipant.Listener
Interface that provides LocalParticipant events.
  • Method Details

    • onAudioTrackPublished

      void onAudioTrackPublished(@NonNull LocalParticipant localParticipant, @NonNull LocalAudioTrackPublication localAudioTrackPublication)
      This method notifies the listener that a LocalAudioTrack has been shared to a Room. Note: If a LocalAudioTrack was provided in ConnectOptions this callback will not be triggered because the track is published prior to Room.Listener.onConnected(com.twilio.video.Room) being raised.
      Parameters:
      localParticipant - The local participant that published the audio track.
      localAudioTrackPublication - The published local audio track.
    • onAudioTrackPublicationFailed

      void onAudioTrackPublicationFailed(@NonNull LocalParticipant localParticipant, @NonNull LocalAudioTrack localAudioTrack, @NonNull TwilioException twilioException)
      This method notifies the listener that the LocalParticipant failed to publish a LocalAudioTrack to a Room.
      Parameters:
      localParticipant - The local participant that failed to publish the audio track.
      localAudioTrack - The local audio track that could not be published.
      twilioException - An exception explaining why the local participant failed to publish the local audio track.
    • onVideoTrackPublished

      void onVideoTrackPublished(@NonNull LocalParticipant localParticipant, @NonNull LocalVideoTrackPublication localVideoTrackPublication)
      This method notifies the listener that a LocalVideoTrack has been shared to a Room. Note: If a LocalVideoTrack was provided in ConnectOptions this callback will not be triggered because the track is published prior to Room.Listener.onConnected(com.twilio.video.Room) being raised.
      Parameters:
      localParticipant - The local participant that published the video track.
      localVideoTrackPublication - The published local video track.
    • onVideoTrackPublicationFailed

      void onVideoTrackPublicationFailed(@NonNull LocalParticipant localParticipant, @NonNull LocalVideoTrack localVideoTrack, @NonNull TwilioException twilioException)
      This method notifies the listener that the LocalParticipant failed to publish a LocalVideoTrack to a Room.
      Parameters:
      localParticipant - The local participant that failed to publish the video track.
      localVideoTrack - The local video track that could not be published.
      twilioException - An exception explaining why the local participant failed to publish the local video track.
    • onDataTrackPublished

      void onDataTrackPublished(@NonNull LocalParticipant localParticipant, @NonNull LocalDataTrackPublication localDataTrackPublication)
      This method notifies the listener that a LocalDataTrack has been shared to a Room. Please note that in P2P and GO rooms, this method will not get invoked.
      Parameters:
      localParticipant - The local participant that published the data track.
      localDataTrackPublication - The published local data track.
    • onDataTrackPublicationFailed

      void onDataTrackPublicationFailed(@NonNull LocalParticipant localParticipant, @NonNull LocalDataTrack localDataTrack, @NonNull TwilioException twilioException)
      This method notifies the listener that the LocalParticipant failed to publish a LocalDataTrack to a Room. Please note that in P2P and GO rooms, this method will not get invoked.
      Parameters:
      localParticipant - The local participant that failed to publish the data track.
      localDataTrack - The local data track that could not be published.
      twilioException - An exception explaining why the local participant failed to publish the local data track.
    • onNetworkQualityLevelChanged

      default void onNetworkQualityLevelChanged(@NonNull LocalParticipant localParticipant, @NonNull NetworkQualityLevel networkQualityLevel)
      This method notifies the listener that the LocalParticipant's NetworkQualityLevel has changed.
      Parameters:
      localParticipant - The LocalParticipant.
      networkQualityLevel - The new NetworkQualityLevel.