Package com.twilio.video
Interface RemoteParticipant.Listener
- Enclosing class:
- RemoteParticipant
public static interface RemoteParticipant.Listener
Interface that provides
RemoteParticipant
events.-
Method Summary
Modifier and TypeMethodDescriptionvoid
onAudioTrackDisabled
(RemoteParticipant remoteParticipant, RemoteAudioTrackPublication remoteAudioTrackPublication) This method notifies the listener that aRemoteParticipant
audio track has been disabled.void
onAudioTrackEnabled
(RemoteParticipant remoteParticipant, RemoteAudioTrackPublication remoteAudioTrackPublication) This method notifies the listener that aRemoteParticipant
audio track has been enabled.void
onAudioTrackPublished
(RemoteParticipant remoteParticipant, RemoteAudioTrackPublication remoteAudioTrackPublication) This method notifies the listener that aRemoteParticipant
has published aRemoteAudioTrack
to thisRoom
.default void
onAudioTrackPublishPriorityChanged
(RemoteParticipant remoteParticipant, RemoteAudioTrackPublication remoteAudioTrackPublication, TrackPriority trackPriority) This method notifies the listener that theRemoteParticipant
changed the published priority of theRemoteAudioTrack
.void
onAudioTrackSubscribed
(RemoteParticipant remoteParticipant, RemoteAudioTrackPublication remoteAudioTrackPublication, RemoteAudioTrack remoteAudioTrack) This method notifies the listener theRemoteAudioTrack
of theRemoteParticipant
has been subscribed to.void
onAudioTrackSubscriptionFailed
(RemoteParticipant remoteParticipant, RemoteAudioTrackPublication remoteAudioTrackPublication, TwilioException twilioException) This method notifies the listener that media negotiation for aRemoteAudioTrack
failed.void
onAudioTrackUnpublished
(RemoteParticipant remoteParticipant, RemoteAudioTrackPublication remoteAudioTrackPublication) This method notifies the listener that aRemoteParticipant
has unpublished aRemoteAudioTrack
from thisRoom
.void
onAudioTrackUnsubscribed
(RemoteParticipant remoteParticipant, RemoteAudioTrackPublication remoteAudioTrackPublication, RemoteAudioTrack remoteAudioTrack) This method notifies the listener that theRemoteAudioTrack
of theRemoteParticipant
has been unsubscribed from.void
onDataTrackPublished
(RemoteParticipant remoteParticipant, RemoteDataTrackPublication remoteDataTrackPublication) This method notifies the listener that aRemoteParticipant
has published aRemoteDataTrack
to thisRoom
.default void
onDataTrackPublishPriorityChanged
(RemoteParticipant remoteParticipant, RemoteDataTrackPublication remoteDataTrackPublication, TrackPriority trackPriority) This method notifies the listener that theRemoteParticipant
changed the published priority of theRemoteDataTrack
.void
onDataTrackSubscribed
(RemoteParticipant remoteParticipant, RemoteDataTrackPublication remoteDataTrackPublication, RemoteDataTrack remoteDataTrack) This method notifies the listener theRemoteDataTrack
of theRemoteParticipant
has been subscribed to.void
onDataTrackSubscriptionFailed
(RemoteParticipant remoteParticipant, RemoteDataTrackPublication remoteDataTrackPublication, TwilioException twilioException) This method notifies the listener that media negotiation for aRemoteDataTrack
failed.void
onDataTrackUnpublished
(RemoteParticipant remoteParticipant, RemoteDataTrackPublication remoteDataTrackPublication) This method notifies the listener that aRemoteParticipant
has removed aRemoteDataTrack
from thisRoom
.void
onDataTrackUnsubscribed
(RemoteParticipant remoteParticipant, RemoteDataTrackPublication remoteDataTrackPublication, RemoteDataTrack remoteDataTrack) This method notifies the listener that theRemoteDataTrack
of theRemoteParticipant
has been unsubscribed from.default void
onNetworkQualityLevelChanged
(RemoteParticipant remoteParticipant, NetworkQualityLevel networkQualityLevel) This method notifies the listener that theRemoteParticipant
'sNetworkQualityLevel
has changed.void
onVideoTrackDisabled
(RemoteParticipant remoteParticipant, RemoteVideoTrackPublication remoteVideoTrackPublication) This method notifies the listener that aRemoteParticipant
video track has been disabled.void
onVideoTrackEnabled
(RemoteParticipant remoteParticipant, RemoteVideoTrackPublication remoteVideoTrackPublication) This method notifies the listener that aRemoteParticipant
video track has been enabled.void
onVideoTrackPublished
(RemoteParticipant remoteParticipant, RemoteVideoTrackPublication remoteVideoTrackPublication) This method notifies the listener that aRemoteParticipant
has published aRemoteVideoTrack
to thisRoom
.default void
onVideoTrackPublishPriorityChanged
(RemoteParticipant remoteParticipant, RemoteVideoTrackPublication remoteVideoTrackPublication, TrackPriority trackPriority) This method notifies the listener that theRemoteParticipant
changed the published priority of theRemoteVideoTrack
.void
onVideoTrackSubscribed
(RemoteParticipant remoteParticipant, RemoteVideoTrackPublication remoteVideoTrackPublication, RemoteVideoTrack remoteVideoTrack) This method notifies the listener theRemoteVideoTrack
of theRemoteParticipant
has been subscribed to.void
onVideoTrackSubscriptionFailed
(RemoteParticipant remoteParticipant, RemoteVideoTrackPublication remoteVideoTrackPublication, TwilioException twilioException) This method notifies the listener that media negotiation for aRemoteVideoTrack
failed.default void
onVideoTrackSwitchedOff
(RemoteParticipant remoteParticipant, RemoteVideoTrack remoteVideoTrack) This method notifies the listener that a subscribedRemoteVideoTrack
is switched off based on the bandwidth allocation algorithm.default void
onVideoTrackSwitchedOn
(RemoteParticipant remoteParticipant, RemoteVideoTrack remoteVideoTrack) This method notifies the listener that a subscribedRemoteVideoTrack
that was switched off is now switched back on based on the bandwidth allocation algorithm.void
onVideoTrackUnpublished
(RemoteParticipant remoteParticipant, RemoteVideoTrackPublication remoteVideoTrackPublication) This method notifies the listener that aRemoteParticipant
has removed aRemoteVideoTrack
from thisRoom
.void
onVideoTrackUnsubscribed
(RemoteParticipant remoteParticipant, RemoteVideoTrackPublication remoteVideoTrackPublication, RemoteVideoTrack remoteVideoTrack) This method notifies the listener that theRemoteVideoTrack
of theRemoteParticipant
has been unsubscribed from.
-
Method Details
-
onAudioTrackPublished
void onAudioTrackPublished(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteAudioTrackPublication remoteAudioTrackPublication) This method notifies the listener that aRemoteParticipant
has published aRemoteAudioTrack
to thisRoom
. The audio of the track is not audible until the track has been subscribed to.- Parameters:
remoteParticipant
- The participant object associated with this audio track.remoteAudioTrackPublication
- The audio track publication.
-
onAudioTrackUnpublished
void onAudioTrackUnpublished(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteAudioTrackPublication remoteAudioTrackPublication) This method notifies the listener that aRemoteParticipant
has unpublished aRemoteAudioTrack
from thisRoom
.- Parameters:
remoteParticipant
- The participant object associated with this audio track.remoteAudioTrackPublication
- The audio track publication.
-
onAudioTrackSubscribed
void onAudioTrackSubscribed(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteAudioTrackPublication remoteAudioTrackPublication, @NonNull RemoteAudioTrack remoteAudioTrack) This method notifies the listener theRemoteAudioTrack
of theRemoteParticipant
has been subscribed to. The audio track is audible after this callback.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this audio track.remoteAudioTrackPublication
- The audio track publication.remoteAudioTrack
- The audio track subscribed to.
-
onAudioTrackSubscriptionFailed
void onAudioTrackSubscriptionFailed(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteAudioTrackPublication remoteAudioTrackPublication, @NonNull TwilioException twilioException) This method notifies the listener that media negotiation for aRemoteAudioTrack
failed.- Parameters:
remoteParticipant
- The remoteParticipant object associated with the audio track.remoteAudioTrackPublication
- The audio track publication for which subscription failed.twilioException
- Exception that describes failure.
-
onAudioTrackUnsubscribed
void onAudioTrackUnsubscribed(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteAudioTrackPublication remoteAudioTrackPublication, @NonNull RemoteAudioTrack remoteAudioTrack) This method notifies the listener that theRemoteAudioTrack
of theRemoteParticipant
has been unsubscribed from. The track is no longer audible after being unsubscribed from the audio track.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this audio track.remoteAudioTrackPublication
- The audio track publication.remoteAudioTrack
- The audio track unsubscribed from.
-
onAudioTrackPublishPriorityChanged
default void onAudioTrackPublishPriorityChanged(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteAudioTrackPublication remoteAudioTrackPublication, @NonNull TrackPriority trackPriority) This method notifies the listener that theRemoteParticipant
changed the published priority of theRemoteAudioTrack
.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this audio track.remoteAudioTrackPublication
- The audio track publication.trackPriority
- The new track priority.
-
onVideoTrackPublished
void onVideoTrackPublished(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteVideoTrackPublication remoteVideoTrackPublication) This method notifies the listener that aRemoteParticipant
has published aRemoteVideoTrack
to thisRoom
. Video frames will not begin flowing until the video track has been subscribed to.- Parameters:
remoteParticipant
- The participant object associated with this video track.remoteVideoTrackPublication
- The video track publication.
-
onVideoTrackUnpublished
void onVideoTrackUnpublished(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteVideoTrackPublication remoteVideoTrackPublication) This method notifies the listener that aRemoteParticipant
has removed aRemoteVideoTrack
from thisRoom
.- Parameters:
remoteParticipant
- The participant object associated with this video track.remoteVideoTrackPublication
- The video track publication.
-
onVideoTrackSubscribed
void onVideoTrackSubscribed(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteVideoTrackPublication remoteVideoTrackPublication, @NonNull RemoteVideoTrack remoteVideoTrack) This method notifies the listener theRemoteVideoTrack
of theRemoteParticipant
has been subscribed to. Video frames are now flowing and can be rendered.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this video track.remoteVideoTrackPublication
- The video track publication.remoteVideoTrack
- The video track subscribed to.
-
onVideoTrackSubscriptionFailed
void onVideoTrackSubscriptionFailed(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteVideoTrackPublication remoteVideoTrackPublication, @NonNull TwilioException twilioException) This method notifies the listener that media negotiation for aRemoteVideoTrack
failed.- Parameters:
remoteParticipant
- The remoteParticipant object associated with the video track.remoteVideoTrackPublication
- The video track publication for which subscription failed.twilioException
- Exception that describes failure.
-
onVideoTrackUnsubscribed
void onVideoTrackUnsubscribed(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteVideoTrackPublication remoteVideoTrackPublication, @NonNull RemoteVideoTrack remoteVideoTrack) This method notifies the listener that theRemoteVideoTrack
of theRemoteParticipant
has been unsubscribed from. Video frames are no longer flowing. AllVideoSink
s of the video track have been removed before receiving this callback to prevent native memory leaks.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this video track.remoteVideoTrackPublication
- The video track publication.remoteVideoTrack
- The video track removed from this room.
-
onVideoTrackPublishPriorityChanged
default void onVideoTrackPublishPriorityChanged(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteVideoTrackPublication remoteVideoTrackPublication, @NonNull TrackPriority trackPriority) This method notifies the listener that theRemoteParticipant
changed the published priority of theRemoteVideoTrack
.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this video track.remoteVideoTrackPublication
- The video track publication.trackPriority
- The new track priority.
-
onDataTrackPublished
void onDataTrackPublished(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteDataTrackPublication remoteDataTrackPublication) This method notifies the listener that aRemoteParticipant
has published aRemoteDataTrack
to thisRoom
.- Parameters:
remoteParticipant
- The participant object associated with this data track.remoteDataTrackPublication
- The data track publication.
-
onDataTrackUnpublished
void onDataTrackUnpublished(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteDataTrackPublication remoteDataTrackPublication) This method notifies the listener that aRemoteParticipant
has removed aRemoteDataTrack
from thisRoom
.- Parameters:
remoteParticipant
- The participant object associated with this data track.remoteDataTrackPublication
- The data track publication.
-
onDataTrackSubscribed
void onDataTrackSubscribed(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteDataTrackPublication remoteDataTrackPublication, @NonNull RemoteDataTrack remoteDataTrack) This method notifies the listener theRemoteDataTrack
of theRemoteParticipant
has been subscribed to. Data track messages can be now be received.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this data track.remoteDataTrackPublication
- The data track publication.remoteDataTrack
- The data track subscribed to.
-
onDataTrackSubscriptionFailed
void onDataTrackSubscriptionFailed(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteDataTrackPublication remoteDataTrackPublication, @NonNull TwilioException twilioException) This method notifies the listener that media negotiation for aRemoteDataTrack
failed.- Parameters:
remoteParticipant
- The remoteParticipant object associated with the data track.remoteDataTrackPublication
- The data track publication for which subscription failed.twilioException
- Exception that describes failure.
-
onDataTrackUnsubscribed
void onDataTrackUnsubscribed(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteDataTrackPublication remoteDataTrackPublication, @NonNull RemoteDataTrack remoteDataTrack) This method notifies the listener that theRemoteDataTrack
of theRemoteParticipant
has been unsubscribed from. Data track messages will no longer be received.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this data track.remoteDataTrackPublication
- The data track publication.remoteDataTrack
- The data track removed from this room.
-
onDataTrackPublishPriorityChanged
default void onDataTrackPublishPriorityChanged(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteDataTrackPublication remoteDataTrackPublication, @NonNull TrackPriority trackPriority) This method notifies the listener that theRemoteParticipant
changed the published priority of theRemoteDataTrack
.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this data track.remoteDataTrackPublication
- The data track publication.trackPriority
- The new track priority.
-
onAudioTrackEnabled
void onAudioTrackEnabled(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteAudioTrackPublication remoteAudioTrackPublication) This method notifies the listener that aRemoteParticipant
audio track has been enabled.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this audio track.remoteAudioTrackPublication
- The audio track publication.
-
onAudioTrackDisabled
void onAudioTrackDisabled(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteAudioTrackPublication remoteAudioTrackPublication) This method notifies the listener that aRemoteParticipant
audio track has been disabled.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this audio track.remoteAudioTrackPublication
- The audio track publication.
-
onVideoTrackEnabled
void onVideoTrackEnabled(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteVideoTrackPublication remoteVideoTrackPublication) This method notifies the listener that aRemoteParticipant
video track has been enabled.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this audio track.remoteVideoTrackPublication
- The video track publication.
-
onVideoTrackDisabled
void onVideoTrackDisabled(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteVideoTrackPublication remoteVideoTrackPublication) This method notifies the listener that aRemoteParticipant
video track has been disabled.- Parameters:
remoteParticipant
- The remoteParticipant object associated with this audio track.remoteVideoTrackPublication
- The video track publication.
-
onVideoTrackSwitchedOn
default void onVideoTrackSwitchedOn(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteVideoTrack remoteVideoTrack) This method notifies the listener that a subscribedRemoteVideoTrack
that was switched off is now switched back on based on the bandwidth allocation algorithm. Video will be received for theRemoteVideoTrack
until it is switched off.- Parameters:
remoteParticipant
- The remoteParticipant object associated with the video track.remoteVideoTrack
- The subscribed remote video track.
-
onVideoTrackSwitchedOff
default void onVideoTrackSwitchedOff(@NonNull RemoteParticipant remoteParticipant, @NonNull RemoteVideoTrack remoteVideoTrack) This method notifies the listener that a subscribedRemoteVideoTrack
is switched off based on the bandwidth allocation algorithm. Video will not be received for theRemoteVideoTrack
until it is switched back on.- Parameters:
remoteParticipant
- The remoteParticipant object associated with the video track.remoteVideoTrack
- The subscribed remote video track.
-
onNetworkQualityLevelChanged
default void onNetworkQualityLevelChanged(@NonNull RemoteParticipant remoteParticipant, @NonNull NetworkQualityLevel networkQualityLevel) This method notifies the listener that theRemoteParticipant
'sNetworkQualityLevel
has changed.- Parameters:
remoteParticipant
- TheRemoteParticipant
.networkQualityLevel
- The newNetworkQualityLevel
.
-