Package com.mux.sdk.webrtc.spaces
Class LocalParticipant
- java.lang.Object
-
- com.mux.sdk.webrtc.spaces.Participant
-
- com.mux.sdk.webrtc.spaces.LocalParticipant
-
public class LocalParticipant extends Participant
A LocalParticipant is the local peer connected to the space.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LocalParticipant.Errors
-
Field Summary
-
Fields inherited from class com.mux.sdk.webrtc.spaces.Participant
connectionId, displayName, id, space, spaceId
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
LocalVideoCameraTrack
getCameraTrack()
Get the camera track for this localParticipant.LocalAudioTrack
getMicrophoneTrack()
Get the microphone track for this localParticipant.LocalScreenCaptureTrack
getScreenCaptureTrack()
Get the screen capture track for this localParticipant.int
hashCode()
void
publish(LocalTrack localTrack)
Publish aLocalTrack
to the spacevoid
publishCustomEvent(java.lang.String payload)
void
setDisplayName(java.lang.String displayName)
void
unpublish(LocalTrack localTrack)
Unpublishes a track from the spacevoid
unpublishAll()
Unpublishes all media for aLocalParticipant
-
Methods inherited from class com.mux.sdk.webrtc.spaces.Participant
getConnectionId, getDisplayName, getId, getRole, isActiveSpeaker, isTrackSourceMuted, roleSupportsPublishing, toString, updateDisplayName
-
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classParticipant
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classParticipant
-
publish
public void publish(LocalTrack localTrack) throws java.lang.IllegalStateException
Publish aLocalTrack
to the space- Parameters:
localTrack
-- Throws:
java.lang.IllegalStateException
- when the LocalParticipant is not joined in a Space
-
unpublish
public void unpublish(LocalTrack localTrack) throws java.lang.IllegalStateException
Unpublishes a track from the space- Parameters:
localTrack
-- Throws:
java.lang.IllegalStateException
- when the LocalParticipant is not joined in a Space
-
unpublishAll
public void unpublishAll()
Unpublishes all media for aLocalParticipant
-
publishCustomEvent
public void publishCustomEvent(java.lang.String payload)
-
setDisplayName
public void setDisplayName(java.lang.String displayName)
-
getCameraTrack
public LocalVideoCameraTrack getCameraTrack()
Get the camera track for this localParticipant. i.e. the camera of the device. The camera track is a special class which adds methods such as setCamera for if you want to change the camera.- Returns:
-
getMicrophoneTrack
public LocalAudioTrack getMicrophoneTrack()
Get the microphone track for this localParticipant. i.e. the microphone track of the device. We don't expose special controls for this track at this time beyond the usual mute/unmute functionality.- Returns:
-
getScreenCaptureTrack
public LocalScreenCaptureTrack getScreenCaptureTrack()
Get the screen capture track for this localParticipant. This requires a bit more set up work to use than other tracks, and you're best off referring to an example or asking Mux support if you're interested in using this. It's not all that hard, just difficult to document properly.- Returns:
-
-