Class RoomServiceClient

    • Method Detail

      • createRoom

        @JvmOverloads() final Call<<Error class: unknown class>> createRoom(String name, Integer emptyTimeout, Integer maxParticipants, String nodeId, String metadata, Integer minPlayoutDelay, Integer maxPlayoutDelay, Boolean syncStreams, Integer departureTimeout)

        Creates a new room. Explicit room creation is not required, since rooms will be automatically created when the first participant joins. This method can be used to customize room settings.

      • createRoom

        @JvmOverloads() final Call<<Error class: unknown class>> createRoom(String name, Integer emptyTimeout, Integer maxParticipants, String nodeId, String metadata, Integer minPlayoutDelay, Integer maxPlayoutDelay, Boolean syncStreams)

        Creates a new room. Explicit room creation is not required, since rooms will be automatically created when the first participant joins. This method can be used to customize room settings.

      • createRoom

        @JvmOverloads() final Call<<Error class: unknown class>> createRoom(String name, Integer emptyTimeout, Integer maxParticipants, String nodeId, String metadata, Integer minPlayoutDelay, Integer maxPlayoutDelay)

        Creates a new room. Explicit room creation is not required, since rooms will be automatically created when the first participant joins. This method can be used to customize room settings.

      • createRoom

        @JvmOverloads() final Call<<Error class: unknown class>> createRoom(String name, Integer emptyTimeout, Integer maxParticipants, String nodeId, String metadata, Integer minPlayoutDelay)

        Creates a new room. Explicit room creation is not required, since rooms will be automatically created when the first participant joins. This method can be used to customize room settings.

      • createRoom

        @JvmOverloads() final Call<<Error class: unknown class>> createRoom(String name, Integer emptyTimeout, Integer maxParticipants, String nodeId, String metadata)

        Creates a new room. Explicit room creation is not required, since rooms will be automatically created when the first participant joins. This method can be used to customize room settings.

      • createRoom

        @JvmOverloads() final Call<<Error class: unknown class>> createRoom(String name, Integer emptyTimeout, Integer maxParticipants, String nodeId)

        Creates a new room. Explicit room creation is not required, since rooms will be automatically created when the first participant joins. This method can be used to customize room settings.

      • createRoom

        @JvmOverloads() final Call<<Error class: unknown class>> createRoom(String name, Integer emptyTimeout, Integer maxParticipants)

        Creates a new room. Explicit room creation is not required, since rooms will be automatically created when the first participant joins. This method can be used to customize room settings.

      • createRoom

        @JvmOverloads() final Call<<Error class: unknown class>> createRoom(String name, Integer emptyTimeout)

        Creates a new room. Explicit room creation is not required, since rooms will be automatically created when the first participant joins. This method can be used to customize room settings.

      • createRoom

        @JvmOverloads() final Call<<Error class: unknown class>> createRoom(String name)

        Creates a new room. Explicit room creation is not required, since rooms will be automatically created when the first participant joins. This method can be used to customize room settings.

      • listRooms

        @JvmOverloads() final Call<List<<Error class: unknown class>>> listRooms(List<String> names)

        List active rooms

        Parameters:
        names - when null or empty, list all rooms.
      • updateRoomMetadata

         final Call<<Error class: unknown class>> updateRoomMetadata(String roomName, String metadata)

        Update metadata of a room

        Parameters:
        roomName - name of the room
        metadata - the new metadata for the room
      • listParticipants

         final Call<List<<Error class: unknown class>>> listParticipants(String roomName)

        List participants in a room

        Parameters:
        roomName - name of the room
      • getParticipant

         final Call<<Error class: unknown class>> getParticipant(String roomName, String identity)

        Get information on a specific participant, including the tracks that participant has published

        Parameters:
        roomName - name of the room
        identity - identity of the participant to return
      • removeParticipant

         final Call<Void> removeParticipant(String roomName, String identity)

        Removes a participant in the room. This will disconnect the participant and will emit a Disconnected event for that participant. Even after being removed, the participant can still re-join the room.

      • forwardParticipant

         final Call<<Error class: unknown class>> forwardParticipant(String roomName, String identity, String destinationRoomName)

        Forward a participant's track(s) to another room. Requires roomAdmin and destinationRoom. The forwarding will stop when the participant leaves the room or RemoveParticipant has been called in the destination room. A participant can be forwarded to multiple rooms. The destination room will be created if it does not exist.

      • moveParticipant

         final Call<<Error class: unknown class>> moveParticipant(String roomName, String identity, String destinationRoomName)

        Move a participant from one room to another room.

      • mutePublishedTrack

         final Call<<Error class: unknown class>> mutePublishedTrack(String roomName, String identity, String trackSid, Boolean mute)

        Mutes a track that the participant has published.

        Parameters:
        trackSid - sid of the track to be muted
        mute - true to mute, false to unmute
      • updateParticipant

        @JvmOverloads() final Call<<Error class: unknown class>> ,java.util.Map)>updateParticipant(String roomName, String identity, String name, String metadata, <Error class: unknown class> participantPermission, Map<String, String> attributes)

        Updates a participant's metadata or permissions

        Parameters:
        name - optional, participant name to update
        metadata - optional, metadata to update
        participantPermission - optional, new permissions to assign to participant
        attributes - attributes to update.
      • updateParticipant

        @JvmOverloads() final Call<<Error class: unknown class>> ,java.util.Map)>updateParticipant(String roomName, String identity, String name, String metadata, <Error class: unknown class> participantPermission)

        Updates a participant's metadata or permissions

        Parameters:
        name - optional, participant name to update
        metadata - optional, metadata to update
        participantPermission - optional, new permissions to assign to participant
      • create

        @Deprecated(message = "Use RoomServiceClient.createClient()", replaceWith = @ReplaceWith(imports = {"import io.livekit.server.okhttp.OkHttpFactory"}, expression = "RoomServiceClient.createClient(host, apiKey, secret, OkHttpFactory(logging, okHttpConfigurator))"))@JvmOverloads() final static RoomServiceClient create(String host, String apiKey, String secret, Boolean logging, Consumer<OkHttpClient.Builder> okHttpConfigurator)

        Create a RoomServiceClient.

        Parameters:
        okHttpConfigurator - provide this if you wish to customize the http client (e.g.
      • create

        @Deprecated(message = "Use RoomServiceClient.createClient()", replaceWith = @ReplaceWith(imports = {"import io.livekit.server.okhttp.OkHttpFactory"}, expression = "RoomServiceClient.createClient(host, apiKey, secret, OkHttpFactory(logging, okHttpConfigurator))"))@JvmOverloads() final static RoomServiceClient create(String host, String apiKey, String secret, Boolean logging)

        Create a RoomServiceClient.

      • create

        @Deprecated(message = "Use RoomServiceClient.createClient()", replaceWith = @ReplaceWith(imports = {"import io.livekit.server.okhttp.OkHttpFactory"}, expression = "RoomServiceClient.createClient(host, apiKey, secret, OkHttpFactory(logging, okHttpConfigurator))"))@JvmOverloads() final static RoomServiceClient create(String host, String apiKey, String secret)

        Create a RoomServiceClient.