livekit-client 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.esm.mjs +83 -28
- package/dist/livekit-client.esm.mjs.map +1 -1
- package/dist/livekit-client.umd.js +1 -1
- package/dist/livekit-client.umd.js.map +1 -1
- package/dist/src/options.d.ts +5 -0
- package/dist/src/options.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +1 -0
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +2 -1
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/defaults.d.ts.map +1 -1
- package/dist/src/room/events.d.ts +7 -0
- package/dist/src/room/events.d.ts.map +1 -1
- package/dist/src/room/track/LocalAudioTrack.d.ts +1 -1
- package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteTrackPublication.d.ts.map +1 -1
- package/dist/src/room/track/RemoteVideoTrack.d.ts +1 -0
- package/dist/src/room/track/RemoteVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/utils.d.ts.map +1 -1
- package/dist/ts4.2/src/options.d.ts +5 -0
- package/dist/ts4.2/src/room/RTCEngine.d.ts +1 -0
- package/dist/ts4.2/src/room/Room.d.ts +2 -1
- package/dist/ts4.2/src/room/events.d.ts +7 -0
- package/dist/ts4.2/src/room/track/LocalAudioTrack.d.ts +1 -1
- package/dist/ts4.2/src/room/track/RemoteVideoTrack.d.ts +1 -0
- package/package.json +1 -1
- package/src/options.ts +6 -0
- package/src/room/RTCEngine.ts +25 -16
- package/src/room/Room.ts +15 -5
- package/src/room/defaults.ts +1 -0
- package/src/room/events.ts +8 -0
- package/src/room/track/LocalAudioTrack.ts +1 -0
- package/src/room/track/RemoteTrackPublication.ts +6 -1
- package/src/room/track/RemoteVideoTrack.test.ts +2 -0
- package/src/room/track/RemoteVideoTrack.ts +48 -5
- package/src/room/track/utils.ts +3 -2
package/dist/src/options.d.ts
CHANGED
@@ -49,6 +49,11 @@ export interface InternalRoomOptions {
|
|
49
49
|
* policy to use when attempting to reconnect
|
50
50
|
*/
|
51
51
|
reconnectPolicy: ReconnectPolicy;
|
52
|
+
/**
|
53
|
+
* specifies whether the sdk should automatically disconnect the room
|
54
|
+
* on 'pagehide' and 'beforeunload' events
|
55
|
+
*/
|
56
|
+
disconnectOnPageLeave: boolean;
|
52
57
|
/**
|
53
58
|
* @internal
|
54
59
|
* experimental flag, introduce a delay before sending signaling messages
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;OAQG;IACH,cAAc,EAAE,sBAAsB,GAAG,OAAO,CAAC;IAEjD;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,oBAAoB,CAAC,EAAE,mBAAmB,CAAC;IAE3C;;OAEG;IACH,oBAAoB,CAAC,EAAE,mBAAmB,CAAC;IAE3C;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,CAAC;IAEvC;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAEjC;;;OAGG;IACH,yBAAyB,EAAE,OAAO,CAAC;IAEnC;;OAEG;IACH,eAAe,EAAE,eAAe,CAAC;IAEjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IAEH,cAAc,EAAE,OAAO,GAAG,gBAAgB,CAAC;CAC5C;AAED;;GAE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AC;IAEjC;;;OAGG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IAEH,cAAc,EAAE,OAAO,GAAG,gBAAgB,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO,CAAC,mBAAmB,CAAC;CAAG;AAEpE;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,mEAAmE;IACnE,aAAa,EAAE,OAAO,CAAC;IAEvB,2EAA2E;IAC3E,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,sHAAsH;IACtH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,OAAO,CAAC,0BAA0B,CAAC;CAAG"}
|
@@ -44,6 +44,7 @@ export default class RTCEngine extends RTCEngine_base {
|
|
44
44
|
/** specifies how often an initial join connection is allowed to retry */
|
45
45
|
private maxJoinAttempts;
|
46
46
|
private closingLock;
|
47
|
+
private dataProcessLock;
|
47
48
|
private shouldFailNext;
|
48
49
|
constructor(options: InternalRoomOptions);
|
49
50
|
join(url: string, token: string, opts: SignalOptions, abortSignal?: AbortSignal): Promise<JoinResponse>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RTCEngine.d.ts","sourceRoot":"","sources":["../../../src/room/RTCEngine.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAGL,UAAU,EACV,eAAe,EACf,gBAAgB,EAEhB,WAAW,EACX,SAAS,EACT,UAAU,E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BAAkB,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,cAAc,GAAG,SAAS;IAmBpF,QAAQ;IAKR,OAAO,CAAC,qBAAqB;IAM7B,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,mBAAmB,CAMzB;IAEF,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,wBAAwB;CAKjC;AAsCD,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,YAAY,EAAE,CAAC,MAAM,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,EAAE,CACf,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,oBAAoB,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC7D,kBAAkB,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5E,iBAAiB,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,KAAK,IAAI,CAAC;CAC9E,CAAC"}
|
package/dist/src/room/Room.d.ts
CHANGED
@@ -105,7 +105,7 @@ declare class Room extends Room_base {
|
|
105
105
|
* @internal for testing
|
106
106
|
*/
|
107
107
|
simulateScenario(scenario: string): Promise<void>;
|
108
|
-
private
|
108
|
+
private onPageLeave;
|
109
109
|
/**
|
110
110
|
* Browsers have different policies regarding audio playback. Most requiring
|
111
111
|
* some form of user interaction (click/tap/etc).
|
@@ -203,6 +203,7 @@ export type RoomEventCallbacks = {
|
|
203
203
|
trackUnmuted: (publication: TrackPublication, participant: Participant) => void;
|
204
204
|
localTrackPublished: (publication: LocalTrackPublication, participant: LocalParticipant) => void;
|
205
205
|
localTrackUnpublished: (publication: LocalTrackPublication, participant: LocalParticipant) => void;
|
206
|
+
localAudioSilenceDetected: (publication: LocalTrackPublication) => void;
|
206
207
|
participantMetadataChanged: (metadata: string | undefined, participant: RemoteParticipant | LocalParticipant) => void;
|
207
208
|
participantPermissionsChanged: (prevPermissions: ParticipantPermission | undefined, participant: RemoteParticipant | LocalParticipant) => void;
|
208
209
|
activeSpeakersChanged: (speakers: Array<Participant>) => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Room.d.ts","sourceRoot":"","sources":["../../../src/room/Room.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAG9C,OAAO,KAAK,EAEV,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,gBAAgB,EAGhB,qBAAqB,EAQtB,MAAM,yBAAyB,CAAC;AAkBjC,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAChE,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,OAAO,qBAAqB,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,sBAAsB,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EA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O,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;IACzF,iBAAiB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC1C,uBAAuB,EAAE,CACvB,WAAW,EAAE,sBAAsB,EACnC,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,iBAAiB,KAC3B,IAAI,CAAC;IACV,kCAAkC,EAAE,CAClC,WAAW,EAAE,sBAAsB,EACnC,MAAM,EAAE,gBAAgB,CAAC,gBAAgB,EACzC,WAAW,EAAE,iBAAiB,KAC3B,IAAI,CAAC;IACV,8BAA8B,EAAE,CAC9B,WAAW,EAAE,sBAAsB,EACnC,MAAM,EAAE,gBAAgB,CAAC,kBAAkB,EAC3C,WAAW,EAAE,iBAAiB,KAC3B,IAAI,CAAC;IACV,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,sBAAsB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CACtD,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/room/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAElF,OAAO,EACL,mBAAmB,EAGnB,oBAAoB,EACpB,mBAAmB,EAEpB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,eAAe,EAAE,oBAUpB,CAAC;AAEX,eAAO,MAAM,aAAa,EAAE,mBAI3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,mBAE3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/room/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAElF,OAAO,EACL,mBAAmB,EAGnB,oBAAoB,EACpB,mBAAmB,EAEpB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,eAAe,EAAE,oBAUpB,CAAC;AAEX,eAAO,MAAM,aAAa,EAAE,mBAI3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,mBAE3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,mBAOvB,CAAC;AAEX,eAAO,MAAM,yBAAyB,EAAE,0BAI9B,CAAC"}
|
@@ -120,6 +120,13 @@ export declare enum RoomEvent {
|
|
120
120
|
* args: ([[LocalTrackPublication]], [[LocalParticipant]])
|
121
121
|
*/
|
122
122
|
LocalTrackUnpublished = "localTrackUnpublished",
|
123
|
+
/**
|
124
|
+
* When a local audio track is published the SDK checks whether there is complete silence
|
125
|
+
* on that track and emits the LocalAudioSilenceDetected event in that case.
|
126
|
+
* This allows for applications to show UI informing users that they might have to
|
127
|
+
* reset their audio hardware or check for proper device connectivity.
|
128
|
+
*/
|
129
|
+
LocalAudioSilenceDetected = "localAudioSilenceDetected",
|
123
130
|
/**
|
124
131
|
* Active speakers changed. List of speakers are ordered by their audio level.
|
125
132
|
* loudest speakers first. This will include the LocalParticipant too.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/room/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,oBAAY,SAAS;IACnB;;OAEG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;;OAGG;IACH,YAAY,iBAAiB;IAE7B;;;;OAIG;IACH,sBAAsB,2BAA2B;IAEjD;;OAEG;IACH,YAAY,2BAA2B;IAEvC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;;;;;OAMG;IACH,oBAAoB,yBAAyB;IAE7C;;;;;OAKG;IACH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UAAU;IACpB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB;;OAEG;IACH,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,gBAAgB;IAChB,cAAc,mBAAmB;IACjC,gBAAgB;IAChB,kBAAkB,uBAAuB;IACzC,gBAAgB;IAChB,oBAAoB,yBAAyB;IAC7C,gBAAgB;IAChB,mBAAmB,wBAAwB;IAC3C;;;OAGG;IACH,oBAAoB,yBAAyB;IAC7C,gBAAgB;IAChB,iBAAiB,sBAAsB;IACvC,gBAAgB;IAChB,sBAAsB,2BAA2B;IACjD,gBAAgB;IAChB,eAAe,oBAAoB;IACnC,gBAAgB;IAChB,eAAe,oBAAoB;IACnC;;;OAGG;IACH,cAAc,mBAAmB;IACjC;;;OAGG;IACH,eAAe,oBAAoB;IACnC;;;OAGG;IACH,6BAA6B,kCAAkC;IAC/D;;OAEG;IACH,yBAAyB,8BAA8B;CACxD"}
|
@@ -20,6 +20,6 @@ export default class LocalAudioTrack extends LocalTrack {
|
|
20
20
|
startMonitor(): void;
|
21
21
|
protected monitorSender: () => Promise<void>;
|
22
22
|
getSenderStats(): Promise<AudioSenderStats | undefined>;
|
23
|
-
checkForSilence(): Promise<
|
23
|
+
checkForSilence(): Promise<boolean>;
|
24
24
|
}
|
25
25
|
//# sourceMappingURL=LocalAudioTrack.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalAudioTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/LocalAudioTrack.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAoC,MAAM,UAAU,CAAC;AAE9E,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAIrD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU;IACrD,gBAAgB;IAChB,UAAU,EAAE,OAA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E;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,OAAO;IA2BjC,IAAI,kBAAkB,IAAI,gBAAgB,CAAC,kBAAkB,CAQ5D;IAED,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,gBAAgB,CAIxD;IAED;;OAEG;IACH,IAAI,YAAY,IAAI,OAAO,CAK1B;IAGD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;;;OAKG;IACH,UAAU,CAAC,OAAO,EAAE,OAAO;IAS3B;;;;;;OAMG;IACH,eAAe,CAAC,OAAO,EAAE,YAAY;IAUrC,kBAAkB,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU;IAkB/C,WAAW,CAAC,GAAG,EAAE,MAAM;IAiBvB,IAAI,YAAY,IAAI,YAAY,GAAG,SAAS,CAE3C;IAED,gBAAgB;IAChB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW;IA2B5B,gBAAgB;IAChB,UAAU,CAAC,OAAO,EAAE,OAAO;IAQ3B,gBAAgB;IAChB,UAAU,CAAC,IAAI,EAAE,SAAS;IAW1B,OAAO,CAAC,+BAA+B;IAQvC,OAAO,CAAC,6BAA6B;IAarC,OAAO,CAAC,wBAAwB;IAchC,SAAS,CAAC,WAAW,UAAW,WAAW,UAGzC;IAEF,SAAS,KAAK,gBAAgB,IAAI,OAAO,CAExC;IAED,SAAS,CAAC,sBAAsB,YAAa,OAAO,UAMlD;IAEF,SAAS,CAAC,2BAA2B,eAAgB,MAAM,UAAU,UAMnE;IAGF,eAAe;CAkBhB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RemoteVideoTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteVideoTrack.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"RemoteVideoTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteVideoTrack.ts"],"names":[],"mappings":"AAWA,OAAO,WAAW,MAAM,eAAe,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AO,EAAE,OAAO,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IAExC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,OAAO,IAAI,IAAI,CAAC;IAChB,aAAa,IAAI,IAAI,CAAC;CACvB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/room/track/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,wBAAgB,mBAAmB,CACjC,OAAO,CAAC,EAAE,wBAAwB,EAClC,aAAa,CAAC,EAAE,mBAAmB,EACnC,aAAa,CAAC,EAAE,mBAAmB,GAClC,wBAAwB,CAqB1B;AAYD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,wBAAwB,GAAG,sBAAsB,CAqC/F;AACD;;;GAGG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,SAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBzF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,GAAG,IAAI,
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/room/track/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,wBAAgB,mBAAmB,CACjC,OAAO,CAAC,EAAE,wBAAwB,EAClC,aAAa,CAAC,EAAE,mBAAmB,EACnC,aAAa,CAAC,EAAE,mBAAmB,GAClC,wBAAwB,CAqB1B;AAYD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,wBAAwB,GAAG,sBAAsB,CAqC/F;AACD;;;GAGG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,SAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBzF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,GAAG,IAAI,CAOxD"}
|
@@ -49,6 +49,11 @@ export interface InternalRoomOptions {
|
|
49
49
|
* policy to use when attempting to reconnect
|
50
50
|
*/
|
51
51
|
reconnectPolicy: ReconnectPolicy;
|
52
|
+
/**
|
53
|
+
* specifies whether the sdk should automatically disconnect the room
|
54
|
+
* on 'pagehide' and 'beforeunload' events
|
55
|
+
*/
|
56
|
+
disconnectOnPageLeave: boolean;
|
52
57
|
/**
|
53
58
|
* @internal
|
54
59
|
* experimental flag, introduce a delay before sending signaling messages
|
@@ -44,6 +44,7 @@ export default class RTCEngine extends RTCEngine_base {
|
|
44
44
|
/** specifies how often an initial join connection is allowed to retry */
|
45
45
|
private maxJoinAttempts;
|
46
46
|
private closingLock;
|
47
|
+
private dataProcessLock;
|
47
48
|
private shouldFailNext;
|
48
49
|
constructor(options: InternalRoomOptions);
|
49
50
|
join(url: string, token: string, opts: SignalOptions, abortSignal?: AbortSignal): Promise<JoinResponse>;
|
@@ -105,7 +105,7 @@ declare class Room extends Room_base {
|
|
105
105
|
* @internal for testing
|
106
106
|
*/
|
107
107
|
simulateScenario(scenario: string): Promise<void>;
|
108
|
-
private
|
108
|
+
private onPageLeave;
|
109
109
|
/**
|
110
110
|
* Browsers have different policies regarding audio playback. Most requiring
|
111
111
|
* some form of user interaction (click/tap/etc).
|
@@ -203,6 +203,7 @@ export type RoomEventCallbacks = {
|
|
203
203
|
trackUnmuted: (publication: TrackPublication, participant: Participant) => void;
|
204
204
|
localTrackPublished: (publication: LocalTrackPublication, participant: LocalParticipant) => void;
|
205
205
|
localTrackUnpublished: (publication: LocalTrackPublication, participant: LocalParticipant) => void;
|
206
|
+
localAudioSilenceDetected: (publication: LocalTrackPublication) => void;
|
206
207
|
participantMetadataChanged: (metadata: string | undefined, participant: RemoteParticipant | LocalParticipant) => void;
|
207
208
|
participantPermissionsChanged: (prevPermissions: ParticipantPermission | undefined, participant: RemoteParticipant | LocalParticipant) => void;
|
208
209
|
activeSpeakersChanged: (speakers: Array<Participant>) => void;
|
@@ -120,6 +120,13 @@ export declare enum RoomEvent {
|
|
120
120
|
* args: ([[LocalTrackPublication]], [[LocalParticipant]])
|
121
121
|
*/
|
122
122
|
LocalTrackUnpublished = "localTrackUnpublished",
|
123
|
+
/**
|
124
|
+
* When a local audio track is published the SDK checks whether there is complete silence
|
125
|
+
* on that track and emits the LocalAudioSilenceDetected event in that case.
|
126
|
+
* This allows for applications to show UI informing users that they might have to
|
127
|
+
* reset their audio hardware or check for proper device connectivity.
|
128
|
+
*/
|
129
|
+
LocalAudioSilenceDetected = "localAudioSilenceDetected",
|
123
130
|
/**
|
124
131
|
* Active speakers changed. List of speakers are ordered by their audio level.
|
125
132
|
* loudest speakers first. This will include the LocalParticipant too.
|
@@ -20,6 +20,6 @@ export default class LocalAudioTrack extends LocalTrack {
|
|
20
20
|
startMonitor(): void;
|
21
21
|
protected monitorSender: () => Promise<void>;
|
22
22
|
getSenderStats(): Promise<AudioSenderStats | undefined>;
|
23
|
-
checkForSilence(): Promise<
|
23
|
+
checkForSilence(): Promise<boolean>;
|
24
24
|
}
|
25
25
|
//# sourceMappingURL=LocalAudioTrack.d.ts.map
|
package/package.json
CHANGED
package/src/options.ts
CHANGED
@@ -64,6 +64,12 @@ export interface InternalRoomOptions {
|
|
64
64
|
*/
|
65
65
|
reconnectPolicy: ReconnectPolicy;
|
66
66
|
|
67
|
+
/**
|
68
|
+
* specifies whether the sdk should automatically disconnect the room
|
69
|
+
* on 'pagehide' and 'beforeunload' events
|
70
|
+
*/
|
71
|
+
disconnectOnPageLeave: boolean;
|
72
|
+
|
67
73
|
/**
|
68
74
|
* @internal
|
69
75
|
* experimental flag, introduce a delay before sending signaling messages
|
package/src/room/RTCEngine.ts
CHANGED
@@ -134,6 +134,8 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
|
|
134
134
|
|
135
135
|
private closingLock: Mutex;
|
136
136
|
|
137
|
+
private dataProcessLock: Mutex;
|
138
|
+
|
137
139
|
private shouldFailNext: boolean = false;
|
138
140
|
|
139
141
|
constructor(private options: InternalRoomOptions) {
|
@@ -143,6 +145,7 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
|
|
143
145
|
this.reconnectPolicy = this.options.reconnectPolicy;
|
144
146
|
this.registerOnLineListener();
|
145
147
|
this.closingLock = new Mutex();
|
148
|
+
this.dataProcessLock = new Mutex();
|
146
149
|
}
|
147
150
|
|
148
151
|
async join(
|
@@ -524,22 +527,28 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
|
|
524
527
|
};
|
525
528
|
|
526
529
|
private handleDataMessage = async (message: MessageEvent) => {
|
527
|
-
//
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
530
|
+
// make sure to respect incoming data message order by processing message events one after the other
|
531
|
+
const unlock = await this.dataProcessLock.lock();
|
532
|
+
try {
|
533
|
+
// decode
|
534
|
+
let buffer: ArrayBuffer | undefined;
|
535
|
+
if (message.data instanceof ArrayBuffer) {
|
536
|
+
buffer = message.data;
|
537
|
+
} else if (message.data instanceof Blob) {
|
538
|
+
buffer = await message.data.arrayBuffer();
|
539
|
+
} else {
|
540
|
+
log.error('unsupported data type', message.data);
|
541
|
+
return;
|
542
|
+
}
|
543
|
+
const dp = DataPacket.decode(new Uint8Array(buffer));
|
544
|
+
if (dp.value?.$case === 'speaker') {
|
545
|
+
// dispatch speaker updates
|
546
|
+
this.emit(EngineEvent.ActiveSpeakersUpdate, dp.value.speaker.speakers);
|
547
|
+
} else if (dp.value?.$case === 'user') {
|
548
|
+
this.emit(EngineEvent.DataPacketReceived, dp.value.user, dp.kind);
|
549
|
+
}
|
550
|
+
} finally {
|
551
|
+
unlock();
|
543
552
|
}
|
544
553
|
};
|
545
554
|
|
package/src/room/Room.ts
CHANGED
@@ -391,8 +391,10 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
391
391
|
CriticalTimers.clearTimeout(connectTimeout);
|
392
392
|
this.abortController?.signal.removeEventListener('abort', abortHandler);
|
393
393
|
// also hook unload event
|
394
|
-
if (isWeb()) {
|
395
|
-
|
394
|
+
if (isWeb() && this.options.disconnectOnPageLeave) {
|
395
|
+
// capturing both 'pagehide' and 'beforeunload' to capture broadest set of browser behaviors
|
396
|
+
window.addEventListener('pagehide', this.onPageLeave);
|
397
|
+
window.addEventListener('beforeunload', this.onPageLeave);
|
396
398
|
navigator.mediaDevices?.addEventListener('devicechange', this.handleDeviceChange);
|
397
399
|
}
|
398
400
|
this.setAndEmitConnectionState(ConnectionState.Connected);
|
@@ -549,7 +551,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
549
551
|
}
|
550
552
|
}
|
551
553
|
|
552
|
-
private
|
554
|
+
private onPageLeave = async () => {
|
553
555
|
await this.disconnect();
|
554
556
|
};
|
555
557
|
|
@@ -853,7 +855,8 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
853
855
|
this.audioContext = undefined;
|
854
856
|
}
|
855
857
|
if (isWeb()) {
|
856
|
-
window.removeEventListener('beforeunload', this.
|
858
|
+
window.removeEventListener('beforeunload', this.onPageLeave);
|
859
|
+
window.removeEventListener('pagehide', this.onPageLeave);
|
857
860
|
navigator.mediaDevices?.removeEventListener('devicechange', this.handleDeviceChange);
|
858
861
|
}
|
859
862
|
this.setAndEmitConnectionState(ConnectionState.Disconnected);
|
@@ -1275,8 +1278,14 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
1275
1278
|
this.emit(RoomEvent.TrackUnmuted, pub, this.localParticipant);
|
1276
1279
|
};
|
1277
1280
|
|
1278
|
-
private onLocalTrackPublished = (pub: LocalTrackPublication) => {
|
1281
|
+
private onLocalTrackPublished = async (pub: LocalTrackPublication) => {
|
1279
1282
|
this.emit(RoomEvent.LocalTrackPublished, pub, this.localParticipant);
|
1283
|
+
if (pub.track instanceof LocalAudioTrack) {
|
1284
|
+
const trackIsSilent = await pub.track.checkForSilence();
|
1285
|
+
if (trackIsSilent) {
|
1286
|
+
this.emit(RoomEvent.LocalAudioSilenceDetected, pub);
|
1287
|
+
}
|
1288
|
+
}
|
1280
1289
|
};
|
1281
1290
|
|
1282
1291
|
private onLocalTrackUnpublished = (pub: LocalTrackPublication) => {
|
@@ -1455,6 +1464,7 @@ export type RoomEventCallbacks = {
|
|
1455
1464
|
publication: LocalTrackPublication,
|
1456
1465
|
participant: LocalParticipant,
|
1457
1466
|
) => void;
|
1467
|
+
localAudioSilenceDetected: (publication: LocalTrackPublication) => void;
|
1458
1468
|
participantMetadataChanged: (
|
1459
1469
|
metadata: string | undefined,
|
1460
1470
|
participant: RemoteParticipant | LocalParticipant,
|
package/src/room/defaults.ts
CHANGED
package/src/room/events.ts
CHANGED
@@ -139,6 +139,14 @@ export enum RoomEvent {
|
|
139
139
|
*/
|
140
140
|
LocalTrackUnpublished = 'localTrackUnpublished',
|
141
141
|
|
142
|
+
/**
|
143
|
+
* When a local audio track is published the SDK checks whether there is complete silence
|
144
|
+
* on that track and emits the LocalAudioSilenceDetected event in that case.
|
145
|
+
* This allows for applications to show UI informing users that they might have to
|
146
|
+
* reset their audio hardware or check for proper device connectivity.
|
147
|
+
*/
|
148
|
+
LocalAudioSilenceDetected = 'localAudioSilenceDetected',
|
149
|
+
|
142
150
|
/**
|
143
151
|
* Active speakers changed. List of speakers are ordered by their audio level.
|
144
152
|
* loudest speakers first. This will include the LocalParticipant too.
|
@@ -207,8 +207,13 @@ export default class RemoteTrackPublication extends TrackPublication {
|
|
207
207
|
/** @internal */
|
208
208
|
updateInfo(info: TrackInfo) {
|
209
209
|
super.updateInfo(info);
|
210
|
+
const prevMetadataMuted = this.metadataMuted;
|
210
211
|
this.metadataMuted = info.muted;
|
211
|
-
this.track
|
212
|
+
if (this.track) {
|
213
|
+
this.track.setMuted(info.muted);
|
214
|
+
} else if (prevMetadataMuted !== info.muted) {
|
215
|
+
this.emit(info.muted ? TrackEvent.Muted : TrackEvent.Unmuted);
|
216
|
+
}
|
212
217
|
}
|
213
218
|
|
214
219
|
private emitSubscriptionUpdateIfChanged(previousStatus: TrackPublication.SubscriptionStatus) {
|
@@ -3,7 +3,12 @@ import log from '../../logger';
|
|
3
3
|
import { TrackEvent } from '../events';
|
4
4
|
import { computeBitrate, VideoReceiverStats } from '../stats';
|
5
5
|
import CriticalTimers from '../timers';
|
6
|
-
import {
|
6
|
+
import {
|
7
|
+
getIntersectionObserver,
|
8
|
+
getResizeObserver,
|
9
|
+
isWeb,
|
10
|
+
ObservableMediaElement,
|
11
|
+
} from '../utils';
|
7
12
|
import RemoteTrack from './RemoteTrack';
|
8
13
|
import { attachToElement, detachTrack, Track } from './Track';
|
9
14
|
import type { AdaptiveStreamSettings } from './types';
|
@@ -223,7 +228,9 @@ export default class RemoteVideoTrack extends RemoteTrack {
|
|
223
228
|
this.adaptiveStreamSettings?.pauseVideoInBackground ?? true // default to true
|
224
229
|
? this.isInBackground
|
225
230
|
: false;
|
226
|
-
const
|
231
|
+
const isPiPMode = this.elementInfos.some((info) => info.pictureInPicture);
|
232
|
+
const isVisible =
|
233
|
+
(this.elementInfos.some((info) => info.visible) && !backgroundPause) || isPiPMode;
|
227
234
|
|
228
235
|
if (this.lastVisible === isVisible) {
|
229
236
|
return;
|
@@ -273,6 +280,7 @@ export interface ElementInfo {
|
|
273
280
|
width(): number;
|
274
281
|
height(): number;
|
275
282
|
visible: boolean;
|
283
|
+
pictureInPicture: boolean;
|
276
284
|
visibilityChangedAt: number | undefined;
|
277
285
|
|
278
286
|
handleResize?: () => void;
|
@@ -284,7 +292,13 @@ export interface ElementInfo {
|
|
284
292
|
class HTMLElementInfo implements ElementInfo {
|
285
293
|
element: HTMLMediaElement;
|
286
294
|
|
287
|
-
visible: boolean
|
295
|
+
get visible(): boolean {
|
296
|
+
return this.isPiP || this.isIntersecting;
|
297
|
+
}
|
298
|
+
|
299
|
+
get pictureInPicture(): boolean {
|
300
|
+
return this.isPiP;
|
301
|
+
}
|
288
302
|
|
289
303
|
visibilityChangedAt: number | undefined;
|
290
304
|
|
@@ -292,9 +306,14 @@ class HTMLElementInfo implements ElementInfo {
|
|
292
306
|
|
293
307
|
handleVisibilityChanged?: () => void;
|
294
308
|
|
309
|
+
private isPiP: boolean;
|
310
|
+
|
311
|
+
private isIntersecting: boolean;
|
312
|
+
|
295
313
|
constructor(element: HTMLMediaElement, visible?: boolean) {
|
296
314
|
this.element = element;
|
297
|
-
this.
|
315
|
+
this.isIntersecting = visible ?? isElementInViewport(element);
|
316
|
+
this.isPiP = isWeb() && document.pictureInPictureElement === element;
|
298
317
|
this.visibilityChangedAt = 0;
|
299
318
|
}
|
300
319
|
|
@@ -307,6 +326,10 @@ class HTMLElementInfo implements ElementInfo {
|
|
307
326
|
}
|
308
327
|
|
309
328
|
observe() {
|
329
|
+
// make sure we update the current visible state once we start to observe
|
330
|
+
this.isIntersecting = isElementInViewport(this.element);
|
331
|
+
this.isPiP = document.pictureInPictureElement === this.element;
|
332
|
+
|
310
333
|
(this.element as ObservableMediaElement).handleResize = () => {
|
311
334
|
this.handleResize?.();
|
312
335
|
};
|
@@ -314,20 +337,40 @@ class HTMLElementInfo implements ElementInfo {
|
|
314
337
|
|
315
338
|
getIntersectionObserver().observe(this.element);
|
316
339
|
getResizeObserver().observe(this.element);
|
340
|
+
(this.element as HTMLVideoElement).addEventListener('enterpictureinpicture', this.onEnterPiP);
|
341
|
+
(this.element as HTMLVideoElement).addEventListener('leavepictureinpicture', this.onLeavePiP);
|
317
342
|
}
|
318
343
|
|
319
344
|
private onVisibilityChanged = (entry: IntersectionObserverEntry) => {
|
320
345
|
const { target, isIntersecting } = entry;
|
321
346
|
if (target === this.element) {
|
322
|
-
this.
|
347
|
+
this.isIntersecting = isIntersecting;
|
323
348
|
this.visibilityChangedAt = Date.now();
|
324
349
|
this.handleVisibilityChanged?.();
|
325
350
|
}
|
326
351
|
};
|
327
352
|
|
353
|
+
private onEnterPiP = () => {
|
354
|
+
this.isPiP = true;
|
355
|
+
this.handleVisibilityChanged?.();
|
356
|
+
};
|
357
|
+
|
358
|
+
private onLeavePiP = () => {
|
359
|
+
this.isPiP = false;
|
360
|
+
this.handleVisibilityChanged?.();
|
361
|
+
};
|
362
|
+
|
328
363
|
stopObserving() {
|
329
364
|
getIntersectionObserver()?.unobserve(this.element);
|
330
365
|
getResizeObserver()?.unobserve(this.element);
|
366
|
+
(this.element as HTMLVideoElement).removeEventListener(
|
367
|
+
'enterpictureinpicture',
|
368
|
+
this.onEnterPiP,
|
369
|
+
);
|
370
|
+
(this.element as HTMLVideoElement).removeEventListener(
|
371
|
+
'leavepictureinpicture',
|
372
|
+
this.onLeavePiP,
|
373
|
+
);
|
331
374
|
}
|
332
375
|
}
|
333
376
|
|
package/src/room/track/utils.ts
CHANGED
@@ -105,8 +105,9 @@ export async function detectSilence(track: AudioTrack, timeOffset = 200): Promis
|
|
105
105
|
* @internal
|
106
106
|
*/
|
107
107
|
export function getNewAudioContext(): AudioContext | void {
|
108
|
-
|
109
|
-
|
108
|
+
const AudioContext =
|
109
|
+
// @ts-ignore
|
110
|
+
typeof window !== 'undefined' && (window.AudioContext || window.webkitAudioContext);
|
110
111
|
if (AudioContext) {
|
111
112
|
return new AudioContext({ latencyHint: 'interactive' });
|
112
113
|
}
|