Skip to content

Commit

Permalink
Merge branch 'main' into nbsp/chore/cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp authored Nov 27, 2024
2 parents 09afb76 + 40ca489 commit b1b3136
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/flat-turtles-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/rtc-node": patch
---

chore(tsconfig): enable `noUncheckedIndexedAccess`
4 changes: 2 additions & 2 deletions packages/livekit-rtc/src/audio_frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export const combineAudioFrames = (buffer: AudioFrame | AudioFrame[]): AudioFram
throw new Error('buffer is empty');
}

const sampleRate = buffer[0].sampleRate;
const channels = buffer[0].channels;
const sampleRate = buffer[0]!.sampleRate;
const channels = buffer[0]!.channels;

let totalSamplesPerChannel = 0;
for (const frame of buffer) {
Expand Down
2 changes: 1 addition & 1 deletion packages/livekit-rtc/src/video_frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class VideoFrame {
const planeInfos = getPlaneInfos(this.dataPtr, this.type, this.width, this.height);
if (planeNth >= planeInfos.length) return;

const planeInfo = planeInfos[planeNth];
const planeInfo = planeInfos[planeNth]!;
return FfiClient.instance.copyBuffer(planeInfo.dataPtr, planeInfo.size);
}

Expand Down
3 changes: 2 additions & 1 deletion packages/livekit-rtc/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist",
"strict": true
"strict": true,
"noUncheckedIndexedAccess": true
},
"include": ["src/**/*.ts"],
"exclude": ["src/**/*.test.ts", "vite.config.ts"]
Expand Down
2 changes: 1 addition & 1 deletion packages/livekit-server-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ svc.deleteRoom('myroom').then(() => {

## Webhooks

The JS SDK also provides helper functions to decode and verify webhook callbacks. While verification is optional, it ensures the authenticity of the message. See [webhooks guide](https://docs.livekit.io/guides/webhooks) for details.
The JS SDK also provides helper functions to decode and verify webhook callbacks. While verification is optional, it ensures the authenticity of the message. See [webhooks guide](https://docs.livekit.io/home/server/webhooks/) for details.

LiveKit POSTs to webhook endpoints with `Content-Type: application/webhook+json`. Please ensure your server is able to receive POST body with that MIME.

Expand Down

0 comments on commit b1b3136

Please sign in to comment.