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 classLocalParticipant.Errors
-
Field Summary
-
Fields inherited from class com.mux.sdk.webrtc.spaces.Participant
connectionId, id, space
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalVideoCameraTrackgetCameraTrack()Get the camera track for this localParticipant.LocalTrackgetMicrophoneTrack()Get the microphone track for this localParticipant.LocalScreenCaptureTrackgetScreenCaptureTrack()Get the screen capture track for this localParticipant.voidpublish(LocalTrack localTrack)Publish aLocalTrackto the spacevoidunpublish(LocalTrack localTrack)Unpublishes a track from the spacevoidunpublishAll()Unpublishes all media for aLocalParticipant-
Methods inherited from class com.mux.sdk.webrtc.spaces.Participant
equals, getConnectionId, getId, getRole, hashCode, isActiveSpeaker, isTrackSourceMuted, roleSupportsPublishing, toString
-
-
-
-
Method Detail
-
publish
public void publish(LocalTrack localTrack) throws java.lang.IllegalStateException
Publish aLocalTrackto 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
-
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 LocalTrack 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:
-
-