livekit-client 1.13.3 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/README.md +9 -4
  2. package/dist/livekit-client.e2ee.worker.js +1 -1
  3. package/dist/livekit-client.e2ee.worker.js.map +1 -1
  4. package/dist/livekit-client.e2ee.worker.mjs +86 -16
  5. package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
  6. package/dist/livekit-client.esm.mjs +92 -12
  7. package/dist/livekit-client.esm.mjs.map +1 -1
  8. package/dist/livekit-client.umd.js +1 -1
  9. package/dist/livekit-client.umd.js.map +1 -1
  10. package/dist/src/e2ee/utils.d.ts +3 -0
  11. package/dist/src/e2ee/utils.d.ts.map +1 -1
  12. package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
  13. package/dist/src/room/RTCEngine.d.ts.map +1 -1
  14. package/dist/src/room/events.d.ts +1 -1
  15. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  16. package/dist/src/room/track/LocalTrack.d.ts +7 -0
  17. package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
  18. package/dist/src/room/track/RemoteTrack.d.ts +7 -0
  19. package/dist/src/room/track/RemoteTrack.d.ts.map +1 -1
  20. package/dist/src/room/track/options.d.ts +7 -3
  21. package/dist/src/room/track/options.d.ts.map +1 -1
  22. package/dist/ts4.2/src/e2ee/utils.d.ts +3 -0
  23. package/dist/ts4.2/src/room/events.d.ts +1 -1
  24. package/dist/ts4.2/src/room/track/LocalTrack.d.ts +7 -0
  25. package/dist/ts4.2/src/room/track/RemoteTrack.d.ts +7 -0
  26. package/dist/ts4.2/src/room/track/options.d.ts +7 -3
  27. package/package.json +1 -1
  28. package/src/e2ee/utils.ts +52 -0
  29. package/src/e2ee/worker/FrameCryptor.ts +45 -27
  30. package/src/room/RTCEngine.ts +3 -2
  31. package/src/room/Room.ts +3 -3
  32. package/src/room/events.ts +1 -1
  33. package/src/room/participant/LocalParticipant.ts +7 -6
  34. package/src/room/track/LocalTrack.ts +14 -0
  35. package/src/room/track/RemoteTrack.ts +14 -0
  36. package/src/room/track/options.ts +7 -3
@@ -22,4 +22,7 @@ export declare function mimeTypeToVideoCodecString(mimeType: string): "vp8" | "h
22
22
  * https://tools.ietf.org/html/draft-omara-sframe-00#section-4.3.5.1
23
23
  */
24
24
  export declare function ratchet(material: CryptoKey, salt: string): Promise<ArrayBuffer>;
25
+ export declare function needsRbspUnescaping(frameData: Uint8Array): boolean;
26
+ export declare function parseRbsp(stream: Uint8Array): Uint8Array;
27
+ export declare function writeRbsp(data_in: Uint8Array): Uint8Array;
25
28
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/e2ee/utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,YAE9B;AAED,wBAAgB,0BAA0B,YAGzC;AAED,wBAAgB,2BAA2B,YAM1C;AAED,wBAAgB,YAAY,CAC1B,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,GACjD,KAAK,IAAI,oBAAoB,CAE/B;AAED,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,UAAU,GAAG,WAAW,EAClC,SAAS,GAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAmC,EACrE,KAAK,GAAE,QAAQ,GAAG,SAAqB,sBAUxC;AAED,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,sBAcjE;AAED,wBAAsB,2BAA2B,CAAC,YAAY,EAAE,WAAW,sBAO1E;AA0BD;;;GAGG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM;;;GAiBjE;AAED,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,kCAM1D;AAED;;;GAGG;AACH,wBAAsB,OAAO,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAKrF"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/e2ee/utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,YAE9B;AAED,wBAAgB,0BAA0B,YAGzC;AAED,wBAAgB,2BAA2B,YAM1C;AAED,wBAAgB,YAAY,CAC1B,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,GACjD,KAAK,IAAI,oBAAoB,CAE/B;AAED,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,UAAU,GAAG,WAAW,EAClC,SAAS,GAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAmC,EACrE,KAAK,GAAE,QAAQ,GAAG,SAAqB,sBAUxC;AAED,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,sBAcjE;AAED,wBAAsB,2BAA2B,CAAC,YAAY,EAAE,WAAW,sBAO1E;AA0BD;;;GAGG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM;;;GAiBjE;AAED,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,kCAM1D;AAED;;;GAGG;AACH,wBAAsB,OAAO,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAKrF;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,UAAU,WAKxD;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAoBxD;AAKD,wBAAgB,SAAS,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU,CAkBzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"FrameCryptor.d.ts","sourceRoot":"","sources":["../../../../src/e2ee/worker/FrameCryptor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM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,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/D,iBAAiB,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC7D,qBAAqB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACvE,iBAAiB,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACtD,UAAU,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACtC,uBAAuB,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACnE,eAAe,EAAE,CAAC,cAAc,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IACzD,kBAAkB,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACxD,iBAAiB,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACxD,4BAA4B,EAAE,CAAC,MAAM,EAAE,4BAA4B,KAAK,IAAI,CAAC;CAC9E,CAAC"}
@@ -212,7 +212,7 @@ export declare enum RoomEvent {
212
212
  /**
213
213
  * LiveKit will attempt to autoplay all audio tracks when you attach them to
214
214
  * audio elements. However, if that fails, we'll notify you via AudioPlaybackStatusChanged.
215
- * `Room.canPlayAudio` will indicate if audio playback is permitted.
215
+ * `Room.canPlaybackAudio` will indicate if audio playback is permitted.
216
216
  */
217
217
  AudioPlaybackStatusChanged = "audioPlaybackChanged",
218
218
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"LocalParticipant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/LocalParticipant.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAEL,eAAe,EAEf,eAAe,EACf,qBAAqB,EAEtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,eA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AAC,sBAAsB,CAG5B;IAEF,OAAO,CAAC,6BAA6B,CA0BnC;IAEF,OAAO,CAAC,2BAA2B,CAUjC;IAEF,OAAO,CAAC,gBAAgB,CA+CtB;IAEF,OAAO,CAAC,sBAAsB;IAwB9B,gBAAgB;IAChB,mBAAmB,IAAI,sBAAsB,EAAE;IAe/C,gBAAgB;IAChB,gBAAgB,IAAI,eAAe,EAAE;CAsBtC"}
@@ -56,6 +56,13 @@ export default abstract class LocalTrack extends Track {
56
56
  **/
57
57
  pauseUpstream(): Promise<void>;
58
58
  resumeUpstream(): Promise<void>;
59
+ /**
60
+ * Gets the RTCStatsReport for the LocalTrack's underlying RTCRtpSender
61
+ * See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
62
+ *
63
+ * @returns Promise<RTCStatsReport> | undefined
64
+ */
65
+ getRTCStatsReport(): Promise<RTCStatsReport | undefined>;
59
66
  /**
60
67
  * Sets a processor on this track.
61
68
  * See https://github.com/livekit/track-processors-js for example usage
@@ -1 +1 @@
1
- {"version":3,"file":"LocalTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/LocalTrack.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAoC,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,KAAK,EAAgC,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIxD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,UAAW,SAAQ,KAAK;IACpD,gBAAgB;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB,gBAAgB;IAChB,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB,IAAI,WAAW,0BAEd;IAED,SAAS,CAAC,YAAY,EAAE,qBAAqB,CAAC;IAE9C,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC;IAElC,SAAS,CAAC,cAAc,EA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IAAI,CAAC,EAC3C,0BAA0B,UAAO;IAyCnC,YAAY;IAIZ;;;;;;OAMG;IACG,aAAa;IAanB,SAAS,CAAC,QAAQ,CAAC,aAAa,IAAI,IAAI;CACzC"}
@@ -9,6 +9,13 @@ export default abstract class RemoteTrack extends Track {
9
9
  setMediaStream(stream: MediaStream): void;
10
10
  start(): void;
11
11
  stop(): void;
12
+ /**
13
+ * Gets the RTCStatsReport for the RemoteTrack's underlying RTCRtpReceiver
14
+ * See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
15
+ *
16
+ * @returns Promise<RTCStatsReport> | undefined
17
+ */
18
+ getRTCStatsReport(): Promise<RTCStatsReport | undefined>;
12
19
  startMonitor(): void;
13
20
  protected abstract monitorReceiver(): void;
14
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteTrack.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,WAAY,SAAQ,KAAK;IACrD,gBAAgB;IAChB,QAAQ,CAAC,EAAE,cAAc,CAAC;gBAGxB,UAAU,EAAE,gBAAgB,EAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,QAAQ,CAAC,EAAE,cAAc;IAO3B,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,OAAO;IAQvB,gBAAgB;IAChB,cAAc,CAAC,MAAM,EAAE,WAAW;IAYlC,KAAK;IAML,IAAI;IAOJ,YAAY;IAMZ,SAAS,CAAC,QAAQ,CAAC,eAAe,IAAI,IAAI;CAC3C"}
1
+ {"version":3,"file":"RemoteTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteTrack.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,WAAY,SAAQ,KAAK;IACrD,gBAAgB;IAChB,QAAQ,CAAC,EAAE,cAAc,CAAC;gBAGxB,UAAU,EAAE,gBAAgB,EAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,QAAQ,CAAC,EAAE,cAAc;IAO3B,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,OAAO;IAQvB,gBAAgB;IAChB,cAAc,CAAC,MAAM,EAAE,WAAW;IAYlC,KAAK;IAML,IAAI;IAMJ;;;;;OAKG;IACG,iBAAiB,IAAI,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAS9D,YAAY;IAMZ,SAAS,CAAC,QAAQ,CAAC,eAAe,IAAI,IAAI;CAC3C"}
@@ -134,7 +134,11 @@ export interface ScreenShareCaptureOptions {
134
134
  video?: true | {
135
135
  displaySurface?: 'window' | 'browser' | 'monitor';
136
136
  };
137
- /** capture resolution, defaults to full HD */
137
+ /**
138
+ * capture resolution, defaults to screen resolution
139
+ * NOTE: In Safari 17, specifying any resolution at all would lead to a low-resolution
140
+ * capture. https://bugs.webkit.org/show_bug.cgi?id=263015
141
+ */
138
142
  resolution?: VideoResolution;
139
143
  /** a CaptureController object instance containing methods that can be used to further manipulate the capture session if included. */
140
144
  controller?: unknown;
@@ -222,9 +226,9 @@ export type BackupVideoCodec = (typeof backupCodecs)[number];
222
226
  export declare function isBackupCodec(codec: string): codec is BackupVideoCodec;
223
227
  export declare function isCodecEqual(c1: string | undefined, c2: string | undefined): boolean;
224
228
  /**
225
- * scalability modes for svc, only supprot l3t3 now.
229
+ * scalability modes for svc.
226
230
  */
227
- export type ScalabilityMode = 'L3T3' | 'L3T3_KEY';
231
+ export type ScalabilityMode = 'L1T3' | 'L2T3' | 'L2T3_KEY' | 'L3T3' | 'L3T3_KEY';
228
232
  export declare namespace AudioPresets {
229
233
  const telephone: AudioPreset;
230
234
  const speech: AudioPreset;
@@ -1 +1 @@
1
- {"version":3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AU,IAAI,eAAe,CAOhC;CACF;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED,QAAA,MAAM,YAAY,0BAA2B,CAAC;AAE9C,eAAO,MAAM,WAAW,wCAAyC,CAAC;AAElE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,gBAAgB,CAEtE;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAKpF;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;AAEjF,yBAAiB,YAAY,CAAC;IACrB,MAAM,SAAS,EAAE,WAEvB,CAAC;IACK,MAAM,MAAM,EAAE,WAEpB,CAAC;IACK,MAAM,KAAK,EAAE,WAEnB,CAAC;IACK,MAAM,WAAW,EAAE,WAEzB,CAAC;IACK,MAAM,gBAAgB,EAAE,WAE9B,CAAC;IACK,MAAM,sBAAsB,EAAE,WAEpC,CAAC;CACH;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;CAOrB,CAAC"}
@@ -22,4 +22,7 @@ export declare function mimeTypeToVideoCodecString(mimeType: string): "vp8" | "h
22
22
  * https://tools.ietf.org/html/draft-omara-sframe-00#section-4.3.5.1
23
23
  */
24
24
  export declare function ratchet(material: CryptoKey, salt: string): Promise<ArrayBuffer>;
25
+ export declare function needsRbspUnescaping(frameData: Uint8Array): boolean;
26
+ export declare function parseRbsp(stream: Uint8Array): Uint8Array;
27
+ export declare function writeRbsp(data_in: Uint8Array): Uint8Array;
25
28
  //# sourceMappingURL=utils.d.ts.map
@@ -212,7 +212,7 @@ export declare enum RoomEvent {
212
212
  /**
213
213
  * LiveKit will attempt to autoplay all audio tracks when you attach them to
214
214
  * audio elements. However, if that fails, we'll notify you via AudioPlaybackStatusChanged.
215
- * `Room.canPlayAudio` will indicate if audio playback is permitted.
215
+ * `Room.canPlaybackAudio` will indicate if audio playback is permitted.
216
216
  */
217
217
  AudioPlaybackStatusChanged = "audioPlaybackChanged",
218
218
  /**
@@ -56,6 +56,13 @@ export default abstract class LocalTrack extends Track {
56
56
  **/
57
57
  pauseUpstream(): Promise<void>;
58
58
  resumeUpstream(): Promise<void>;
59
+ /**
60
+ * Gets the RTCStatsReport for the LocalTrack's underlying RTCRtpSender
61
+ * See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
62
+ *
63
+ * @returns Promise<RTCStatsReport> | undefined
64
+ */
65
+ getRTCStatsReport(): Promise<RTCStatsReport | undefined>;
59
66
  /**
60
67
  * Sets a processor on this track.
61
68
  * See https://github.com/livekit/track-processors-js for example usage
@@ -9,6 +9,13 @@ export default abstract class RemoteTrack extends Track {
9
9
  setMediaStream(stream: MediaStream): void;
10
10
  start(): void;
11
11
  stop(): void;
12
+ /**
13
+ * Gets the RTCStatsReport for the RemoteTrack's underlying RTCRtpReceiver
14
+ * See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
15
+ *
16
+ * @returns Promise<RTCStatsReport> | undefined
17
+ */
18
+ getRTCStatsReport(): Promise<RTCStatsReport | undefined>;
12
19
  startMonitor(): void;
13
20
  protected abstract monitorReceiver(): void;
14
21
  }
@@ -134,7 +134,11 @@ export interface ScreenShareCaptureOptions {
134
134
  video?: true | {
135
135
  displaySurface?: 'window' | 'browser' | 'monitor';
136
136
  };
137
- /** capture resolution, defaults to full HD */
137
+ /**
138
+ * capture resolution, defaults to screen resolution
139
+ * NOTE: In Safari 17, specifying any resolution at all would lead to a low-resolution
140
+ * capture. https://bugs.webkit.org/show_bug.cgi?id=263015
141
+ */
138
142
  resolution?: VideoResolution;
139
143
  /** a CaptureController object instance containing methods that can be used to further manipulate the capture session if included. */
140
144
  controller?: unknown;
@@ -230,9 +234,9 @@ export type BackupVideoCodec = (typeof backupCodecs)[number];
230
234
  export declare function isBackupCodec(codec: string): codec is BackupVideoCodec;
231
235
  export declare function isCodecEqual(c1: string | undefined, c2: string | undefined): boolean;
232
236
  /**
233
- * scalability modes for svc, only supprot l3t3 now.
237
+ * scalability modes for svc.
234
238
  */
235
- export type ScalabilityMode = 'L3T3' | 'L3T3_KEY';
239
+ export type ScalabilityMode = 'L1T3' | 'L2T3' | 'L2T3_KEY' | 'L3T3' | 'L3T3_KEY';
236
240
  export declare namespace AudioPresets {
237
241
  const telephone: AudioPreset;
238
242
  const speech: AudioPreset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "livekit-client",
3
- "version": "1.13.3",
3
+ "version": "1.14.0",
4
4
  "description": "JavaScript/TypeScript client SDK for LiveKit",
5
5
  "main": "./dist/livekit-client.umd.js",
6
6
  "unpkg": "./dist/livekit-client.umd.js",
package/src/e2ee/utils.ts CHANGED
@@ -134,3 +134,55 @@ export async function ratchet(material: CryptoKey, salt: string): Promise<ArrayB
134
134
  // https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/deriveBits
135
135
  return crypto.subtle.deriveBits(algorithmOptions, material, 256);
136
136
  }
137
+
138
+ export function needsRbspUnescaping(frameData: Uint8Array) {
139
+ for (var i = 0; i < frameData.length - 3; i++) {
140
+ if (frameData[i] == 0 && frameData[i + 1] == 0 && frameData[i + 2] == 3) return true;
141
+ }
142
+ return false;
143
+ }
144
+
145
+ export function parseRbsp(stream: Uint8Array): Uint8Array {
146
+ const dataOut: number[] = [];
147
+ var length = stream.length;
148
+ for (var i = 0; i < stream.length; ) {
149
+ // Be careful about over/underflow here. byte_length_ - 3 can underflow, and
150
+ // i + 3 can overflow, but byte_length_ - i can't, because i < byte_length_
151
+ // above, and that expression will produce the number of bytes left in
152
+ // the stream including the byte at i.
153
+ if (length - i >= 3 && !stream[i] && !stream[i + 1] && stream[i + 2] == 3) {
154
+ // Two rbsp bytes.
155
+ dataOut.push(stream[i++]);
156
+ dataOut.push(stream[i++]);
157
+ // Skip the emulation byte.
158
+ i++;
159
+ } else {
160
+ // Single rbsp byte.
161
+ dataOut.push(stream[i++]);
162
+ }
163
+ }
164
+ return new Uint8Array(dataOut);
165
+ }
166
+
167
+ const kZerosInStartSequence = 2;
168
+ const kEmulationByte = 3;
169
+
170
+ export function writeRbsp(data_in: Uint8Array): Uint8Array {
171
+ const dataOut: number[] = [];
172
+ var numConsecutiveZeros = 0;
173
+ for (var i = 0; i < data_in.length; ++i) {
174
+ var byte = data_in[i];
175
+ if (byte <= kEmulationByte && numConsecutiveZeros >= kZerosInStartSequence) {
176
+ // Need to escape.
177
+ dataOut.push(kEmulationByte);
178
+ numConsecutiveZeros = 0;
179
+ }
180
+ dataOut.push(byte);
181
+ if (byte == 0) {
182
+ ++numConsecutiveZeros;
183
+ } else {
184
+ numConsecutiveZeros = 0;
185
+ }
186
+ }
187
+ return new Uint8Array(dataOut);
188
+ }
@@ -8,7 +8,7 @@ import { ENCRYPTION_ALGORITHM, IV_LENGTH, UNENCRYPTED_BYTES } from '../constants
8
8
  import { CryptorError, CryptorErrorReason } from '../errors';
9
9
  import { CryptorCallbacks, CryptorEvent } from '../events';
10
10
  import type { DecodeRatchetOptions, KeyProviderOptions, KeySet } from '../types';
11
- import { deriveKeys, isVideoFrame } from '../utils';
11
+ import { deriveKeys, isVideoFrame, needsRbspUnescaping, parseRbsp, writeRbsp } from '../utils';
12
12
  import type { ParticipantKeyHandler } from './ParticipantKeyHandler';
13
13
  import { SifGuard } from './SifGuard';
14
14
 
@@ -211,13 +211,9 @@ export class FrameCryptor extends BaseFrameCryptor {
211
211
  encodedFrame.getMetadata().synchronizationSource ?? -1,
212
212
  encodedFrame.timestamp,
213
213
  );
214
-
214
+ let frameInfo = this.getUnencryptedBytes(encodedFrame);
215
215
  // Thіs is not encrypted and contains the VP8 payload descriptor or the Opus TOC byte.
216
- const frameHeader = new Uint8Array(
217
- encodedFrame.data,
218
- 0,
219
- this.getUnencryptedBytes(encodedFrame),
220
- );
216
+ const frameHeader = new Uint8Array(encodedFrame.data, 0, frameInfo.unencryptedBytes);
221
217
 
222
218
  // Frame trailer contains the R|IV_LENGTH and key index
223
219
  const frameTrailer = new Uint8Array(2);
@@ -240,20 +236,25 @@ export class FrameCryptor extends BaseFrameCryptor {
240
236
  additionalData: new Uint8Array(encodedFrame.data, 0, frameHeader.byteLength),
241
237
  },
242
238
  encryptionKey,
243
- new Uint8Array(encodedFrame.data, this.getUnencryptedBytes(encodedFrame)),
239
+ new Uint8Array(encodedFrame.data, frameInfo.unencryptedBytes),
244
240
  );
245
241
 
246
- const newData = new ArrayBuffer(
247
- frameHeader.byteLength + cipherText.byteLength + iv.byteLength + frameTrailer.byteLength,
242
+ let newDataWithoutHeader = new Uint8Array(
243
+ cipherText.byteLength + iv.byteLength + frameTrailer.byteLength,
248
244
  );
249
- const newUint8 = new Uint8Array(newData);
245
+ newDataWithoutHeader.set(new Uint8Array(cipherText)); // add ciphertext.
246
+ newDataWithoutHeader.set(new Uint8Array(iv), cipherText.byteLength); // append IV.
247
+ newDataWithoutHeader.set(frameTrailer, cipherText.byteLength + iv.byteLength); // append frame trailer.
248
+
249
+ if (frameInfo.isH264) {
250
+ newDataWithoutHeader = writeRbsp(newDataWithoutHeader);
251
+ }
250
252
 
251
- newUint8.set(frameHeader); // copy first bytes.
252
- newUint8.set(new Uint8Array(cipherText), frameHeader.byteLength); // add ciphertext.
253
- newUint8.set(new Uint8Array(iv), frameHeader.byteLength + cipherText.byteLength); // append IV.
254
- newUint8.set(frameTrailer, frameHeader.byteLength + cipherText.byteLength + iv.byteLength); // append frame trailer.
253
+ var newData = new Uint8Array(frameHeader.byteLength + newDataWithoutHeader.byteLength);
254
+ newData.set(frameHeader);
255
+ newData.set(newDataWithoutHeader, frameHeader.byteLength);
255
256
 
256
- encodedFrame.data = newData;
257
+ encodedFrame.data = newData.buffer;
257
258
 
258
259
  return controller.enqueue(encodedFrame);
259
260
  } catch (e: any) {
@@ -350,7 +351,7 @@ export class FrameCryptor extends BaseFrameCryptor {
350
351
  if (!ratchetOpts.encryptionKey && !keySet) {
351
352
  throw new TypeError(`no encryption key found for decryption of ${this.participantIdentity}`);
352
353
  }
353
-
354
+ let frameInfo = this.getUnencryptedBytes(encodedFrame);
354
355
  // Construct frame trailer. Similar to the frame header described in
355
356
  // https://tools.ietf.org/html/draft-omara-sframe-00#section-4.2
356
357
  // but we put it at the end.
@@ -360,11 +361,20 @@ export class FrameCryptor extends BaseFrameCryptor {
360
361
  // ---------+-------------------------+-+---------+----
361
362
 
362
363
  try {
363
- const frameHeader = new Uint8Array(
364
+ const frameHeader = new Uint8Array(encodedFrame.data, 0, frameInfo.unencryptedBytes);
365
+ var encryptedData = new Uint8Array(
364
366
  encodedFrame.data,
365
- 0,
366
- this.getUnencryptedBytes(encodedFrame),
367
+ frameHeader.length,
368
+ encodedFrame.data.byteLength - frameHeader.length,
367
369
  );
370
+ if (frameInfo.isH264 && needsRbspUnescaping(encryptedData)) {
371
+ encryptedData = parseRbsp(encryptedData);
372
+ const newUint8 = new Uint8Array(frameHeader.byteLength + encryptedData.byteLength);
373
+ newUint8.set(frameHeader);
374
+ newUint8.set(encryptedData, frameHeader.byteLength);
375
+ encodedFrame.data = newUint8.buffer;
376
+ }
377
+
368
378
  const frameTrailer = new Uint8Array(encodedFrame.data, encodedFrame.data.byteLength - 2, 2);
369
379
 
370
380
  const ivLength = frameTrailer[0];
@@ -493,7 +503,11 @@ export class FrameCryptor extends BaseFrameCryptor {
493
503
  return iv;
494
504
  }
495
505
 
496
- private getUnencryptedBytes(frame: RTCEncodedVideoFrame | RTCEncodedAudioFrame): number {
506
+ private getUnencryptedBytes(frame: RTCEncodedVideoFrame | RTCEncodedAudioFrame): {
507
+ unencryptedBytes: number;
508
+ isH264: boolean;
509
+ } {
510
+ var frameInfo = { unencryptedBytes: 0, isH264: false };
497
511
  if (isVideoFrame(frame)) {
498
512
  let detectedCodec = this.getVideoCodec(frame) ?? this.videoCodec;
499
513
 
@@ -502,7 +516,8 @@ export class FrameCryptor extends BaseFrameCryptor {
502
516
  }
503
517
 
504
518
  if (detectedCodec === 'vp8') {
505
- return UNENCRYPTED_BYTES[frame.type];
519
+ frameInfo.unencryptedBytes = UNENCRYPTED_BYTES[frame.type];
520
+ return frameInfo;
506
521
  }
507
522
 
508
523
  const data = new Uint8Array(frame.data);
@@ -510,19 +525,20 @@ export class FrameCryptor extends BaseFrameCryptor {
510
525
  const naluIndices = findNALUIndices(data);
511
526
 
512
527
  // if the detected codec is undefined we test whether it _looks_ like a h264 frame as a best guess
513
- const isH264 =
528
+ frameInfo.isH264 =
514
529
  detectedCodec === 'h264' ||
515
530
  naluIndices.some((naluIndex) =>
516
531
  [NALUType.SLICE_IDR, NALUType.SLICE_NON_IDR].includes(parseNALUType(data[naluIndex])),
517
532
  );
518
533
 
519
- if (isH264) {
534
+ if (frameInfo.isH264) {
520
535
  for (const index of naluIndices) {
521
536
  let type = parseNALUType(data[index]);
522
537
  switch (type) {
523
538
  case NALUType.SLICE_IDR:
524
539
  case NALUType.SLICE_NON_IDR:
525
- return index + 2;
540
+ frameInfo.unencryptedBytes = index + 2;
541
+ return frameInfo;
526
542
  default:
527
543
  break;
528
544
  }
@@ -533,9 +549,11 @@ export class FrameCryptor extends BaseFrameCryptor {
533
549
  // no op, we just continue and fallback to vp8
534
550
  }
535
551
 
536
- return UNENCRYPTED_BYTES[frame.type];
552
+ frameInfo.unencryptedBytes = UNENCRYPTED_BYTES[frame.type];
553
+ return frameInfo;
537
554
  } else {
538
- return UNENCRYPTED_BYTES.audio;
555
+ frameInfo.unencryptedBytes = UNENCRYPTED_BYTES.audio;
556
+ return frameInfo;
539
557
  }
540
558
  }
541
559
 
@@ -267,7 +267,7 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
267
267
  this.subscriber.close();
268
268
  this.subscriber = undefined;
269
269
  }
270
-
270
+ this.hasPublished = false;
271
271
  this.primaryPC = undefined;
272
272
 
273
273
  const dcCleanup = (dc: RTCDataChannel | undefined) => {
@@ -1092,7 +1092,8 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
1092
1092
  // this means we'd have to check its status manually and update address
1093
1093
  // manually
1094
1094
  now - startTime > minReconnectWait &&
1095
- this.primaryPC?.connectionState === 'connected'
1095
+ this.primaryPC?.connectionState === 'connected' &&
1096
+ (!this.hasPublished || this.publisher?.pc.connectionState === 'connected')
1096
1097
  ) {
1097
1098
  this.pcState = PCState.Connected;
1098
1099
  }
package/src/room/Room.ts CHANGED
@@ -457,9 +457,9 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
457
457
  }
458
458
  }
459
459
  if (nextUrl) {
460
- log.info('initial connection failed, retrying with another region', {
461
- nextUrl,
462
- });
460
+ log.info(
461
+ `Initial connection failed with ConnectionError: ${e.message}. Retrying with another region: ${nextUrl}`,
462
+ );
463
463
  await connectFn(resolve, reject, nextUrl);
464
464
  } else {
465
465
  reject(e);
@@ -241,7 +241,7 @@ export enum RoomEvent {
241
241
  /**
242
242
  * LiveKit will attempt to autoplay all audio tracks when you attach them to
243
243
  * audio elements. However, if that fails, we'll notify you via AudioPlaybackStatusChanged.
244
- * `Room.canPlayAudio` will indicate if audio playback is permitted.
244
+ * `Room.canPlaybackAudio` will indicate if audio playback is permitted.
245
245
  */
246
246
  AudioPlaybackStatusChanged = 'audioPlaybackChanged',
247
247
 
@@ -33,7 +33,7 @@ import type {
33
33
  TrackPublishOptions,
34
34
  VideoCaptureOptions,
35
35
  } from '../track/options';
36
- import { ScreenSharePresets, VideoPresets, isBackupCodec, isCodecEqual } from '../track/options';
36
+ import { VideoPresets, isBackupCodec, isCodecEqual } from '../track/options';
37
37
  import {
38
38
  constraintsForOptions,
39
39
  mergeDefaultOptions,
@@ -145,8 +145,8 @@ export default class LocalParticipant extends Participant {
145
145
 
146
146
  this.engine
147
147
  .on(EngineEvent.Connected, this.handleReconnected)
148
- .on(EngineEvent.Restarted, this.handleReconnected)
149
- .on(EngineEvent.Resumed, this.handleReconnected)
148
+ .on(EngineEvent.SignalRestarted, this.handleReconnected)
149
+ .on(EngineEvent.SignalResumed, this.handleReconnected)
150
150
  .on(EngineEvent.Restarting, this.handleReconnecting)
151
151
  .on(EngineEvent.Resuming, this.handleReconnecting)
152
152
  .on(EngineEvent.Disconnected, this.handleDisconnected);
@@ -444,9 +444,6 @@ export default class LocalParticipant extends Participant {
444
444
  if (options === undefined) {
445
445
  options = {};
446
446
  }
447
- if (options.resolution === undefined) {
448
- options.resolution = ScreenSharePresets.h1080fps15.resolution;
449
- }
450
447
 
451
448
  if (navigator.mediaDevices.getDisplayMedia === undefined) {
452
449
  throw new DeviceUnsupportedError('getDisplayMedia not supported');
@@ -682,6 +679,10 @@ export default class LocalParticipant extends Participant {
682
679
  // for svc codecs, disable simulcast and use vp8 for backup codec
683
680
  if (track instanceof LocalVideoTrack) {
684
681
  if (isSVCCodec(opts.videoCodec)) {
682
+ // vp9 svc with screenshare has problem to encode, always use L1T3 here
683
+ if (track.source === Track.Source.ScreenShare && opts.videoCodec === 'vp9') {
684
+ opts.scalabilityMode = 'L1T3';
685
+ }
685
686
  // set scalabilityMode to 'L3T3_KEY' by default
686
687
  opts.scalabilityMode = opts.scalabilityMode ?? 'L3T3_KEY';
687
688
  }
@@ -372,6 +372,20 @@ export default abstract class LocalTrack extends Track {
372
372
  }
373
373
  }
374
374
 
375
+ /**
376
+ * Gets the RTCStatsReport for the LocalTrack's underlying RTCRtpSender
377
+ * See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
378
+ *
379
+ * @returns Promise<RTCStatsReport> | undefined
380
+ */
381
+ async getRTCStatsReport(): Promise<RTCStatsReport | undefined> {
382
+ if (!this.sender?.getStats) {
383
+ return;
384
+ }
385
+ const statsReport = await this.sender.getStats();
386
+ return statsReport;
387
+ }
388
+
375
389
  /**
376
390
  * Sets a processor on this track.
377
391
  * See https://github.com/livekit/track-processors-js for example usage
@@ -51,6 +51,20 @@ export default abstract class RemoteTrack extends Track {
51
51
  super.disable();
52
52
  }
53
53
 
54
+ /**
55
+ * Gets the RTCStatsReport for the RemoteTrack's underlying RTCRtpReceiver
56
+ * See https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport
57
+ *
58
+ * @returns Promise<RTCStatsReport> | undefined
59
+ */
60
+ async getRTCStatsReport(): Promise<RTCStatsReport | undefined> {
61
+ if (!this.receiver?.getStats) {
62
+ return;
63
+ }
64
+ const statsReport = await this.receiver.getStats();
65
+ return statsReport;
66
+ }
67
+
54
68
  /* @internal */
55
69
  startMonitor() {
56
70
  if (!this.monitorInterval) {
@@ -153,7 +153,11 @@ export interface ScreenShareCaptureOptions {
153
153
  */
154
154
  video?: true | { displaySurface?: 'window' | 'browser' | 'monitor' };
155
155
 
156
- /** capture resolution, defaults to full HD */
156
+ /**
157
+ * capture resolution, defaults to screen resolution
158
+ * NOTE: In Safari 17, specifying any resolution at all would lead to a low-resolution
159
+ * capture. https://bugs.webkit.org/show_bug.cgi?id=263015
160
+ */
157
161
  resolution?: VideoResolution;
158
162
 
159
163
  /** a CaptureController object instance containing methods that can be used to further manipulate the capture session if included. */
@@ -298,9 +302,9 @@ export function isCodecEqual(c1: string | undefined, c2: string | undefined): bo
298
302
  }
299
303
 
300
304
  /**
301
- * scalability modes for svc, only supprot l3t3 now.
305
+ * scalability modes for svc.
302
306
  */
303
- export type ScalabilityMode = 'L3T3' | 'L3T3_KEY';
307
+ export type ScalabilityMode = 'L1T3' | 'L2T3' | 'L2T3_KEY' | 'L3T3' | 'L3T3_KEY';
304
308
 
305
309
  export namespace AudioPresets {
306
310
  export const telephone: AudioPreset = {