Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into nbsp/revert/f204721
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp committed Dec 29, 2024
2 parents 89e1234 + 69bde5e commit e2806c8
Show file tree
Hide file tree
Showing 28 changed files with 1,602 additions and 1,151 deletions.
5 changes: 5 additions & 0 deletions .changeset/silent-ducks-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'livekit-server-sdk': patch
---

updated SIP APIs to include new API options
5 changes: 5 additions & 0 deletions .changeset/slow-hounds-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@livekit/rtc-node': patch
---

add close method to AudioSource and VideoSource
6 changes: 0 additions & 6 deletions .changeset/stupid-monkeys-invent.md

This file was deleted.

7 changes: 7 additions & 0 deletions examples/agent-dispatch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# agent-dispatch

## 0.0.8

### Patch Changes

- Updated dependencies [[`dd5e40fb9000a335ba06a98deb251d4108fdfc55`](https://github.com/livekit/node-sdks/commit/dd5e40fb9000a335ba06a98deb251d4108fdfc55), [`628b9fd4c2250a13f4ad0205af68df1af34bdf28`](https://github.com/livekit/node-sdks/commit/628b9fd4c2250a13f4ad0205af68df1af34bdf28)]:
- [email protected]

## 0.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/agent-dispatch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function createExplicitDispatch() {
});
console.log('created dispatch', dispatch);

const dispatches = await agentDispatchClient.listDispatches(roomName);
const dispatches = await agentDispatchClient.listDispatch(roomName);
console.log(`there are ${dispatches.length} dispatches in ${roomName}`);
}

Expand Down
4 changes: 2 additions & 2 deletions examples/agent-dispatch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agent-dispatch",
"version": "0.0.7",
"version": "0.0.8",
"description": "An example demonstrating dispatching agents with an API call",
"private": "true",
"author": "LiveKit",
Expand All @@ -14,7 +14,7 @@
"dependencies": {
"dotenv": "^16.4.5",
"livekit-server-sdk": "workspace:*",
"@livekit/protocol": "^1.28.0"
"@livekit/protocol": "^1.30.0"
},
"devDependencies": {
"@types/node": "^20.10.4",
Expand Down
4 changes: 4 additions & 0 deletions examples/publish-wav/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ while (written < dataSize) {
written += frameSize;
}
await source.waitForPlayout();
// release resources allocated for audio publishing
await source.close();

await room.disconnect();

// disposes all resources, only use if no more sessions are expected
await dispose();
10 changes: 5 additions & 5 deletions examples/receive-audio/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ const room = new Room();
let trackToProcess: string | null = null;
let writer: fs.WriteStream | null = null;

room.on(RoomEvent.TrackSubscribed, (track, publication, participant) => {
room.on(RoomEvent.TrackSubscribed, async (track, publication, participant) => {
console.log('subscribed to track', track.sid, publication, participant.identity);
if (track.kind === TrackKind.KIND_AUDIO) {
const stream = new AudioStream(track);
trackToProcess = track.sid;

stream.on('frameReceived', (ev) => {
for await (const frame of stream) {
if (!trackToProcess) {
return;
}
Expand All @@ -92,14 +92,14 @@ room.on(RoomEvent.TrackSubscribed, (track, publication, participant) => {
// create file on first frame
// also guard when track is unsubscribed
writer = fs.createWriteStream('output.wav');
writeWavHeader(writer, ev.frame);
writeWavHeader(writer, frame);
}

if (writer) {
const buf = Buffer.from(ev.frame.data.buffer);
const buf = Buffer.from(frame.data.buffer);
writer.write(buf);
}
});
}
}
});

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.56.0",
"eslint-config-next": "^14.2.4",
"eslint-config-next": "^15.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard": "^17.1.0",
"eslint-config-turbo": "^2.0.0",
Expand All @@ -35,7 +35,7 @@
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^7.0.0",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-tsdoc": "^0.3.0",
"eslint-plugin-tsdoc": "^0.4.0",
"prettier": "^3.2.5",
"turbo": "^2.0.0",
"typescript": "^5.4.5",
Expand Down
6 changes: 6 additions & 0 deletions packages/livekit-rtc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @livekit/rtc-node

## 0.12.2

### Patch Changes

- Fix types export for CJS and build config - [#359](https://github.com/livekit/node-sdks/pull/359) ([@lukasIO](https://github.com/lukasIO))

## 0.12.1

### Patch Changes
Expand Down
2 changes: 2 additions & 0 deletions packages/livekit-rtc/npm/darwin-arm64/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @livekit/rtc-node-darwin-arm64

## 0.12.2

## 0.12.1

## 0.12.0
Expand Down
2 changes: 1 addition & 1 deletion packages/livekit-rtc/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@livekit/rtc-node-darwin-arm64",
"version": "0.12.1",
"version": "0.12.2",
"repository": {
"type": "git",
"url": "https://github.com/livekit/node-sdks.git",
Expand Down
2 changes: 2 additions & 0 deletions packages/livekit-rtc/npm/darwin-x64/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @livekit/rtc-node-darwin-x64

## 0.12.2

## 0.12.1

## 0.12.0
Expand Down
2 changes: 1 addition & 1 deletion packages/livekit-rtc/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@livekit/rtc-node-darwin-x64",
"author": "LiveKit",
"version": "0.12.1",
"version": "0.12.2",
"repository": {
"type": "git",
"url": "https://github.com/livekit/node-sdks.git",
Expand Down
2 changes: 2 additions & 0 deletions packages/livekit-rtc/npm/linux-arm64-gnu/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @livekit/rtc-node-linux-arm64-gnu

## 0.12.2

## 0.12.1

## 0.12.0
Expand Down
2 changes: 1 addition & 1 deletion packages/livekit-rtc/npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@livekit/rtc-node-linux-arm64-gnu",
"author": "LiveKit",
"version": "0.12.1",
"version": "0.12.2",
"repository": {
"type": "git",
"url": "https://github.com/livekit/node-sdks.git",
Expand Down
2 changes: 2 additions & 0 deletions packages/livekit-rtc/npm/linux-x64-gnu/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @livekit/rtc-node-linux-x64-gnu

## 0.12.2

## 0.12.1

## 0.12.0
Expand Down
2 changes: 1 addition & 1 deletion packages/livekit-rtc/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@livekit/rtc-node-linux-x64-gnu",
"author": "LiveKit",
"version": "0.12.1",
"version": "0.12.2",
"repository": {
"type": "git",
"url": "https://github.com/livekit/node-sdks.git",
Expand Down
2 changes: 2 additions & 0 deletions packages/livekit-rtc/npm/win32-x64-msvc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @livekit/rtc-node-win32-x64-msvc

## 0.12.2

## 0.12.1

## 0.12.0
Expand Down
2 changes: 1 addition & 1 deletion packages/livekit-rtc/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@livekit/rtc-node-win32-x64-msvc",
"author": "LiveKit",
"version": "0.12.1",
"version": "0.12.2",
"repository": {
"type": "git",
"url": "https://github.com/livekit/node-sdks.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/livekit-rtc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "LiveKit RTC Node",
"license": "Apache-2.0",
"author": "LiveKit",
"version": "0.12.1",
"version": "0.12.2",
"main": "dist/index.js",
"require": "dist/index.cjs",
"types": "dist/index.d.ts",
Expand Down
4 changes: 4 additions & 0 deletions packages/livekit-rtc/src/audio_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,8 @@ export class AudioSource {
throw new Error(cb.error);
}
}

async close() {
this.ffiHandle.dispose();
}
}
4 changes: 4 additions & 0 deletions packages/livekit-rtc/src/video_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@ export class VideoSource {
message: { case: 'captureVideoFrame', value: req },
});
}

async close() {
this.ffiHandle.dispose();
}
}
8 changes: 8 additions & 0 deletions packages/livekit-server-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# livekit-server-sdk

## 2.9.4

### Patch Changes

- Fix screenshare option not being applied to participant egress - [#362](https://github.com/livekit/node-sdks/pull/362) ([@chrisackermann](https://github.com/chrisackermann))

- Fix types export for CJS and build config - [#359](https://github.com/livekit/node-sdks/pull/359) ([@lukasIO](https://github.com/lukasIO))

## 2.9.3

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/livekit-server-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "livekit-server-sdk",
"version": "2.9.3",
"version": "2.9.4",
"description": "Server-side SDK for LiveKit",
"main": "dist/index.js",
"require": "dist/index.cjs",
Expand Down Expand Up @@ -42,7 +42,7 @@
"test:edge": "vitest --environment edge-runtime run"
},
"dependencies": {
"@livekit/protocol": "^1.29.1",
"@livekit/protocol": "^1.30.0",
"camelcase-keys": "^9.0.0",
"jose": "^5.1.2"
},
Expand All @@ -52,11 +52,11 @@
"@edge-runtime/vm": "^4.0.0",
"@livekit/changesets-changelog-github": "^0.0.4",
"@types/node": "^20.10.1",
"happy-dom": "^15.0.0",
"happy-dom": "^16.0.0",
"prettier": "^3.0.0",
"tsup": "^8.3.5",
"typedoc": "^0.26.0",
"typescript": "5.6.x",
"typedoc": "^0.27.0",
"typescript": "5.7.x",
"vite": "^5.2.9",
"vitest": "^2.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/livekit-server-sdk/src/EgressClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ export class EgressClient extends ServiceBase {
const req = new ParticipantEgressRequest({
roomName,
identity,
screenShare: opts?.screenShare ?? false,
options,
fileOutputs,
streamOutputs,
Expand Down
Loading

0 comments on commit e2806c8

Please sign in to comment.