Class LocalParticipant


  • public class LocalParticipant
    extends Participant
    A LocalParticipant is the local peer connected to the space.
    • Method Detail

      • publish

        public void publish​(LocalTrack localTrack)
                     throws java.lang.IllegalStateException
        Publish a LocalTrack 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 a LocalParticipant
      • publishCustomEvent

        public void publishCustomEvent​(java.lang.String payload)
      • 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: