diff --git a/.changeset/red-cougars-talk.md b/.changeset/red-cougars-talk.md new file mode 100644 index 00000000..474fbba7 --- /dev/null +++ b/.changeset/red-cougars-talk.md @@ -0,0 +1,5 @@ +--- +'livekit-server-sdk': patch +--- + +Support for departure timeout in CreateRoom diff --git a/package.json b/package.json index 19353ec6..ed2f9eac 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "test:edge": "vitest --environment edge-runtime run" }, "dependencies": { - "@livekit/protocol": "^1.10.3", + "@livekit/protocol": "^1.12.0", "camelcase-keys": "^7.0.0", "jose": "^5.1.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ada32b8a..a4669e0b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@livekit/protocol': - specifier: ^1.10.3 - version: 1.10.3 + specifier: ^1.12.0 + version: 1.12.0 camelcase-keys: specifier: ^7.0.0 version: 7.0.2 @@ -569,8 +569,8 @@ packages: - encoding dev: true - /@livekit/protocol@1.10.3: - resolution: {integrity: sha512-m247Fa67VRo6ojCzmHWA5TBTnjZzB9bTYeRP/yMsMiLz+Ug7EKTRHV0uP17hUocRqoPsbejG+JWq/A5JFrlABg==} + /@livekit/protocol@1.12.0: + resolution: {integrity: sha512-AMUWxna4AO/biPaKiu45JYYVHi7sc+sK6pkeNNpqkzL85+eeHkNhkFfENn9YbQKQsVWABkOmcL8p4ZbUjxZkeQ==} dependencies: '@bufbuild/protobuf': 1.7.2 dev: false diff --git a/src/RoomServiceClient.ts b/src/RoomServiceClient.ts index 8be1208b..9aec34b2 100644 --- a/src/RoomServiceClient.ts +++ b/src/RoomServiceClient.ts @@ -1,8 +1,5 @@ import type { DataPacket_Kind, TrackInfo } from '@livekit/protocol'; import { - ParticipantInfo, - ParticipantPermission, - Room, CreateRoomRequest, DeleteRoomRequest, ListParticipantsRequest, @@ -11,6 +8,9 @@ import { ListRoomsResponse, MuteRoomTrackRequest, MuteRoomTrackResponse, + ParticipantInfo, + ParticipantPermission, + Room, RoomEgress, RoomParticipantIdentity, SendDataRequest, @@ -19,7 +19,7 @@ import { UpdateSubscriptionsRequest, } from '@livekit/protocol'; import ServiceBase from './ServiceBase.js'; -import { livekitPackage, Rpc, TwirpRpc } from './TwirpRPC.js'; +import { Rpc, TwirpRpc, livekitPackage } from './TwirpRPC.js'; /** * Options for when creating a room @@ -31,10 +31,15 @@ export interface CreateOptions { name: string; /** - * number of seconds the room should clean up after being empty + * number of seconds to keep the room open before any participant joins */ emptyTimeout?: number; + /** + * number of seconds to keep the room open after the last participant leaves + */ + departureTimeout?: number; + /** * limit to the number of participants in a room at a time */