mediasfu-shared 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/consumers/connectSendTransportAudio.d.ts.map +1 -1
- package/dist/consumers/connectSendTransportScreen.d.ts.map +1 -1
- package/dist/consumers/connectSendTransportVideo.d.ts.map +1 -1
- package/dist/consumers/createSendTransport.d.ts +4 -48
- package/dist/consumers/createSendTransport.d.ts.map +1 -1
- package/dist/consumers/index.cjs +1 -1
- package/dist/consumers/index.js +1 -1
- package/dist/consumers/sendTransportGuard.d.ts +30 -0
- package/dist/consumers/sendTransportGuard.d.ts.map +1 -0
- package/dist/{getParticipantMedia-DEJwXXhU.js → getParticipantMedia-CZbsFBth.js} +3 -3
- package/dist/{getParticipantMedia-DEJwXXhU.js.map → getParticipantMedia-CZbsFBth.js.map} +1 -1
- package/dist/{getParticipantMedia-1okyF4H7.cjs → getParticipantMedia-Dli4dOLp.cjs} +3 -3
- package/dist/{getParticipantMedia-1okyF4H7.cjs.map → getParticipantMedia-Dli4dOLp.cjs.map} +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.native.cjs +4 -3
- package/dist/index.native.cjs.map +1 -1
- package/dist/index.native.js +8 -7
- package/dist/{joinLocalRoom-DS6_6lJL.js → joinLocalRoom-BWoS-8wt.js} +2 -2
- package/dist/{joinLocalRoom-DS6_6lJL.js.map → joinLocalRoom-BWoS-8wt.js.map} +1 -1
- package/dist/{joinLocalRoom-Dsn39SwS.cjs → joinLocalRoom-DQvud99t.cjs} +2 -2
- package/dist/{joinLocalRoom-Dsn39SwS.cjs.map → joinLocalRoom-DQvud99t.cjs.map} +1 -1
- package/dist/sockets/SocketManager.d.ts +7 -0
- package/dist/sockets/SocketManager.d.ts.map +1 -1
- package/dist/types/index.cjs +2 -2
- package/dist/types/index.js +2 -2
- package/dist/{updateParticipantAudioDecibels-Dni8i6AY.cjs → updateParticipantAudioDecibels-CbCP1PDs.cjs} +162 -67
- package/dist/updateParticipantAudioDecibels-CbCP1PDs.cjs.map +1 -0
- package/dist/{updateParticipantAudioDecibels-BBfdHWQ0.js → updateParticipantAudioDecibels-xKKq7Zp5.js} +166 -71
- package/dist/updateParticipantAudioDecibels-xKKq7Zp5.js.map +1 -0
- package/package.json +1 -1
- package/src/consumers/connectSendTransportAudio.ts +7 -4
- package/src/consumers/connectSendTransportScreen.ts +6 -4
- package/src/consumers/connectSendTransportVideo.ts +4 -2
- package/src/consumers/createSendTransport.ts +62 -4
- package/src/consumers/sendTransportGuard.ts +65 -0
- package/src/sockets/SocketManager.ts +31 -1
- package/dist/updateParticipantAudioDecibels-BBfdHWQ0.js.map +0 -1
- package/dist/updateParticipantAudioDecibels-Dni8i6AY.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.1 — 2026-10-10
|
|
4
|
+
|
|
5
|
+
- **One send transport per connection.** Concurrent callers reuse the transport being created, and two produces of the same kind at the same moment share one producer. Fixes devices that sent silence after a quick rejoin or device switch ("connect() already called").
|
|
6
|
+
- **No reconnect loop after a permanent refusal.** When a media server refuses a reconnect for good (credentials replaced by a newer join, room ended, invalid request, no meeting minutes), the socket closes instead of retrying for as long as the page is open. Transient refusals keep retrying.
|
|
7
|
+
|
|
3
8
|
## 1.3.0 — 2026-10-09
|
|
4
9
|
|
|
5
10
|
- **Screen-share audio.** When the media server supports it (`supportsScreenAudio` in the join response), the audio of a shared tab or screen is published as its own producer (`appData.mediaTag: "screen-audio"`) next to the screen video. It pauses, resumes and stops with the screen share, never replaces or mixes into the microphone, and never marks the sharer as speaking. New: `connectSendTransportScreenAudio`, `disconnectSendTransportScreenAudio`, `toggleScreenAudio`, `isScreenAudioProducer`, `canCaptureDisplayAudio`, `buildDisplayMediaOptions`, `setScreenAudioVolume`. `startShareScreen` accepts `supportsScreenAudio`, `screenAudioEnabled`, `screenAudioMode` (`ask` | `always` | `never`) and a `screenAudioPrompt` callback for the SDK's own "share audio too?" dialog. Capture works in Chromium desktop browsers; elsewhere screen sharing stays video-only. On servers without support nothing changes.
|
|
6
11
|
- **Listeners recognise screen audio** from `new-pipe-producer` and `getProducersPipedAlt` (`mediaTag`) and from the participant's `ScreenAudioID`, and forget it on `producer-closed`.
|
|
7
12
|
- **Consumer backup preference.** When a busy consuming node has a connected backup (`alt_domains`), a new stream announced by the busy node waits 1.5 s so the backup's own announcement can be used instead. Requests are never sent to a backup that has not announced the stream.
|
|
8
13
|
- **Clear connection errors.** `connectSocket` now rejects with a `MediaSocketConnectError` that carries the failure `phase` (`before-open`, `after-open`, `rejected`, `timeout`), elapsed time, the browser's online state, and the server's `connection-rejected` `reason` and `stage` (`invalid-credentials`, `meeting-minutes-unavailable`, `api-check-failed`, `invalid-request`, `rejected-before-connection-success`). `describeMediaSocketError` turns it into a sentence for end users, and `retryable` is false when the same credentials cannot succeed. Consume endpoints that refuse a room's credentials are not retried for 60 seconds.
|
|
14
|
+
- **No more silent microphones from a send-transport race.** When the microphone and camera start together (or a toggle overlaps a rejoin), only one send transport is created per connection; later requests wait for it and send their media on it. Previously the second request replaced the first on the media server and that participant's audio could be lost. Two produces of the same kind at the same moment now share one producer.
|
|
9
15
|
- Events that arrive before a consume socket has joined its consuming room are queued and replayed after the join instead of being dropped.
|
|
10
16
|
- Join requests (`checkLimitsAndMakeRequest`, `checkLimitsAndMakeRequestWithStorage`, `handleWelcomeRequest`) no longer count network-only failures (offline, or the media server never reached) toward the 10-attempt limit; `isNetworkOnlyMediaSocketError` tells them apart.
|
|
11
17
|
- `closeAndResize` removes the closed producer's audio-only player (microphone or screen audio) from `audioOnlyStreams`, so a rejoin never leaves a second player behind.
|
|
18
|
+
- **A refused reconnect is final.** When a media server refuses a reconnect for good (the room ended, the credentials were replaced, no meeting minutes), the SDK closes that socket instead of letting Socket.IO retry it for as long as the page stays open. Temporary refusals still retry.
|
|
12
19
|
|
|
13
20
|
## 1.2.7 — 2026-09-30
|
|
14
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectSendTransportAudio.d.ts","sourceRoot":"","sources":["../../src/consumers/connectSendTransportAudio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"connectSendTransportAudio.d.ts","sourceRoot":"","sources":["../../src/consumers/connectSendTransportAudio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGnF,MAAM,WAAW,mCAAmC;IAClD,aAAa,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC/B,iBAAiB,EAAE,SAAS,GAAG,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACrC,sBAAsB,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1C,mBAAmB,EAAE,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,uBAAuB,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,wBAAwB,CAAC,EAAE,CAAC,aAAa,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IACpE,4BAA4B,CAAC,EAAE,CAAC,cAAc,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1E,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAG1C,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;IAC/D,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CAEpB;AAED,MAAM,WAAW,gCAAgC;IAC/C,WAAW,EAAE,eAAe,CAAC;IAC7B,UAAU,EAAE,mCAAmC,CAAC;IAChD,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;CAC3C;AAGD,MAAM,MAAM,6BAA6B,GAAG,CAAC,OAAO,EAAE,gCAAgC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AA0BzG,eAAO,MAAM,cAAc,GAAU,eAAe,QAAQ,EAAE,kBAAkB,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,kBAmBtG,CAAA;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,eAAO,MAAM,yBAAyB,EAAE,6BAgDvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectSendTransportScreen.d.ts","sourceRoot":"","sources":["../../src/consumers/connectSendTransportScreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"connectSendTransportScreen.d.ts","sourceRoot":"","sources":["../../src/consumers/connectSendTransportScreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAG3F,MAAM,WAAW,oCAAoC;IACnD,cAAc,EAAE,QAAQ,GAAG,IAAI,CAAC;IAChC,mBAAmB,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,eAAe,CAAC;IAC9B,iBAAiB,EAAE,SAAS,GAAG,IAAI,CAAC;IACpC,sBAAsB,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1C,MAAM,EAAE,eAAe,CAAC;IACxB,oBAAoB,EAAE,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1D,yBAAyB,CAAC,EAAE,CAAC,aAAa,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IACrE,uBAAuB,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,4BAA4B,CAAC,EAAE,CAAC,cAAc,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAE1E,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;IAChE,gBAAgB,CAAC,EAAE,MAAM,GAAG,CAAC;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,EAAE,oCAAoC,CAAC;IACjD,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;CAC3C;AAGD,MAAM,MAAM,8BAA8B,GAAG,CAAC,OAAO,EAAE,iCAAiC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAuC3G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,eAAO,MAAM,0BAA0B,EAAE,8BA0DxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectSendTransportVideo.d.ts","sourceRoot":"","sources":["../../src/consumers/connectSendTransportVideo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"connectSendTransportVideo.d.ts","sourceRoot":"","sources":["../../src/consumers/connectSendTransportVideo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG3F,MAAM,WAAW,mCAAmC;IAClD,aAAa,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACrC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iBAAiB,EAAE,SAAS,GAAG,IAAI,CAAC;IACpC,sBAAsB,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,wBAAwB,CAAC,EAAE,CAAC,aAAa,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IACpE,uBAAuB,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,4BAA4B,CAAC,EAAE,CAAC,cAAc,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1E,sBAAsB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,gCAAgC;IAC/C,WAAW,EAAE,eAAe,CAAC;IAC7B,UAAU,EAAE,mCAAmC,CAAC;IAChD,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;CAC3C;AAGD,MAAM,MAAM,6BAA6B,GAAG,CAAC,OAAO,EAAE,gCAAgC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AA4BzG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,eAAO,MAAM,yBAAyB,EAAE,6BA4CvC,CAAC"}
|
|
@@ -26,55 +26,11 @@ export interface CreateSendTransportOptions {
|
|
|
26
26
|
}
|
|
27
27
|
export type CreateSendTransportType = (options: CreateSendTransportOptions) => Promise<void>;
|
|
28
28
|
/**
|
|
29
|
-
* Creates
|
|
29
|
+
* Creates the send transport for this socket, or reuses the one that exists or is being created.
|
|
30
30
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* @param {string} options.option - The type of transport to create.
|
|
35
|
-
* @param {CreateSendTransportParameters} options.parameters - The parameters required for creating the transport.
|
|
36
|
-
* @param {string} options.parameters.islevel - The level of the transport.
|
|
37
|
-
* @param {string} options.parameters.member - The member name for the transport.
|
|
38
|
-
* @param {Socket} options.parameters.socket - The primary socket instance.
|
|
39
|
-
* @param {Device} options.parameters.device - The device instance.
|
|
40
|
-
* @param {Transport | null} options.parameters.producerTransport - The primary producer transport object.
|
|
41
|
-
* @param {boolean} options.parameters.transportCreated - The state of the primary transport creation.
|
|
42
|
-
* @param {(transport: Transport | null) => void} options.parameters.updateProducerTransport - The function to update the primary transport object.
|
|
43
|
-
* @param {(state: boolean) => void} options.parameters.updateTransportCreated - The function to update the primary transport creation state.
|
|
44
|
-
* @param {Function} options.parameters.connectSendTransport - The function to connect the send transport.
|
|
45
|
-
* @param {Function} options.parameters.getUpdatedAllParams - The function to get updated parameters.
|
|
46
|
-
* @param {Socket} [options.parameters.localSocket] - The local socket instance.
|
|
47
|
-
* @param {Transport | null} [options.parameters.localProducerTransport] - The local producer transport object.
|
|
48
|
-
* @param {boolean} [options.parameters.localTransportCreated] - The state of the local transport creation.
|
|
49
|
-
* @param {(localTransport: Transport | null) => void} [options.parameters.updateLocalProducerTransport] - The function to update the local transport object.
|
|
50
|
-
* @param {(state: boolean) => void} [options.parameters.updateLocalTransportCreated] - The function to update the local transport creation state.
|
|
51
|
-
* @returns {Promise<void>} A promise that resolves when the send transport is created and configured.
|
|
52
|
-
*
|
|
53
|
-
* @throws Will throw an error if there is an issue creating the send transport.
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* const options = {
|
|
57
|
-
* option: 'video',
|
|
58
|
-
* parameters: {
|
|
59
|
-
* islevel: '1',
|
|
60
|
-
* member: 'John Doe',
|
|
61
|
-
* socket: socketInstance,
|
|
62
|
-
* localSocket: localSocketInstance,
|
|
63
|
-
* device: deviceInstance,
|
|
64
|
-
* producerTransport: null,
|
|
65
|
-
* localProducerTransport: null,
|
|
66
|
-
* transportCreated: false,
|
|
67
|
-
* localTransportCreated: false,
|
|
68
|
-
* updateProducerTransport: (transport) => console.log('Primary transport updated:', transport),
|
|
69
|
-
* updateLocalProducerTransport: (transport) => console.log('Local transport updated:', transport),
|
|
70
|
-
* updateTransportCreated: (state) => console.log('Primary transport created:', state),
|
|
71
|
-
* updateLocalTransportCreated: (state) => console.log('Local transport created:', state),
|
|
72
|
-
* },
|
|
73
|
-
* };
|
|
74
|
-
*
|
|
75
|
-
* createSendTransport(options)
|
|
76
|
-
* .then(() => console.log('Send transport created successfully'))
|
|
77
|
-
* .catch((error) => console.error('Error creating send transport:', error));
|
|
31
|
+
* The server keeps a single producer transport per socket, so a second creation while one is in flight (microphone
|
|
32
|
+
* and camera started together, a rejoin during a toggle) would replace the first on the server and silence the
|
|
33
|
+
* client's uplink. Later callers wait for the creation in flight and then produce their own media on that transport.
|
|
78
34
|
*/
|
|
79
35
|
export declare const createSendTransport: CreateSendTransportType;
|
|
80
36
|
//# sourceMappingURL=createSendTransport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSendTransport.d.ts","sourceRoot":"","sources":["../../src/consumers/createSendTransport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAkB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"createSendTransport.d.ts","sourceRoot":"","sources":["../../src/consumers/createSendTransport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAkB,MAAM,wBAAwB,CAAC;AAGhF,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,6BAA8B,SAAQ,8BAA8B;IACnF,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iBAAiB,EAAE,SAAS,GAAG,IAAI,CAAC;IACpC,sBAAsB,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,uBAAuB,EAAE,CAAC,iBAAiB,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IACvE,4BAA4B,CAAC,EAAE,CAAC,cAAc,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1E,sBAAsB,EAAE,CAAC,gBAAgB,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,2BAA2B,CAAC,EAAE,CAAC,qBAAqB,EAAE,OAAO,KAAK,IAAI,CAAC;IAGvE,oBAAoB,EAAE,wBAAwB,CAAC;IAC/C,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;IACzD,gBAAgB,CAAC,EAAE,MAAM,GAAG,CAAC;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC7C,UAAU,EAAE,6BAA6B,CAAC;CAC3C;AAGD,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,0BAA0B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AA2U7F;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,uBAiCjC,CAAC"}
|
package/dist/consumers/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const updateParticipantAudioDecibels = require("../updateParticipantAudioDecibels-
|
|
3
|
+
const updateParticipantAudioDecibels = require("../updateParticipantAudioDecibels-CbCP1PDs.cjs");
|
|
4
4
|
const audioProcessing = require("../audioProcessing-VCbu70Jt.cjs");
|
|
5
5
|
const translationConsumerSwitch = require("../translationConsumerSwitch-BAsQUpH6.cjs");
|
|
6
6
|
exports.CONSUME_REJECTION_COOLDOWN_MS = updateParticipantAudioDecibels.CONSUME_REJECTION_COOLDOWN_MS;
|
package/dist/consumers/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C, ad, ac, Z, ak, _, ai, a, $, a0, b, d, e, f, g, h, i, j, k, l, ab, m, c, a1, n, o, p, a9, q, r, af, s, a2, a3, a4, t, ag, U, ae, v, V, w, x, y, W, D, H, z, am, A, a5, al, B, E, F, G, a6, O, aj, an, ah, I, J, K, L, M, N, P, Q, R, S, aa, T, u, a7, a8 } from "../updateParticipantAudioDecibels-
|
|
1
|
+
import { C, ad, ac, Z, ak, _, ai, a, $, a0, b, d, e, f, g, h, i, j, k, l, ab, m, c, a1, n, o, p, a9, q, r, af, s, a2, a3, a4, t, ag, U, ae, v, V, w, x, y, W, D, H, z, am, A, a5, al, B, E, F, G, a6, O, aj, an, ah, I, J, K, L, M, N, P, Q, R, S, aa, T, u, a7, a8 } from "../updateParticipantAudioDecibels-xKKq7Zp5.js";
|
|
2
2
|
import { C as C2, c as c2, f as f2, p as p2, r as r2 } from "../audioProcessing-Ca5wm1nV.js";
|
|
3
3
|
import { b as b2, e as e2, d as d2, g as g2, f as f3, l as l2, k as k2, j as j2, i as i2, p as p3, c as c3, a as a10, r as r3, h as h2, s as s2, m as m2 } from "../translationConsumerSwitch-BUODiT6o.js";
|
|
4
4
|
export {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Send-side serialisation.
|
|
3
|
+
*
|
|
4
|
+
* The media server keeps one producer transport per socket. When two media actions (microphone and camera turned on
|
|
5
|
+
* together, a rejoin while a toggle is in flight) each ask for a send transport, the second `createWebRtcTransport`
|
|
6
|
+
* replaces the first on the server: both client transports then send `transport-connect` to the same server
|
|
7
|
+
* transport, the second fails ("connect() already called") and the client's uplink goes silent. Likewise two
|
|
8
|
+
* concurrent produces of the same kind create two producers where the server accepts one.
|
|
9
|
+
*
|
|
10
|
+
* These helpers make later callers wait for the creation (or produce) already in flight and reuse its result.
|
|
11
|
+
*/
|
|
12
|
+
/** The send-transport creation in flight for this socket, if any. */
|
|
13
|
+
export declare const pendingSendTransportCreation: (socket: object | null | undefined) => Promise<void> | undefined;
|
|
14
|
+
/** Runs `create` as the only send-transport creation for this socket until it settles. */
|
|
15
|
+
export declare const trackSendTransportCreation: (socket: object | null | undefined, create: () => Promise<void>) => Promise<void>;
|
|
16
|
+
interface ClosableLike {
|
|
17
|
+
closed?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** True for an existing, open transport or producer. */
|
|
20
|
+
export declare const isOpen: (item: ClosableLike | null | undefined) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Produces once per transport and key at a time. A caller that arrives while the same produce is in flight gets that
|
|
23
|
+
* producer (`joined: true`) instead of creating a second one.
|
|
24
|
+
*/
|
|
25
|
+
export declare const produceOnce: <T>(transport: object, key: string, produce: () => Promise<T>) => Promise<{
|
|
26
|
+
producer: T;
|
|
27
|
+
joined: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=sendTransportGuard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendTransportGuard.d.ts","sourceRoot":"","sources":["../../src/consumers/sendTransportGuard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,qEAAqE;AACrE,eAAO,MAAM,4BAA4B,GAAI,QAAQ,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,OAAO,CAAC,IAAI,CAAC,GAAG,SAC5C,CAAC;AAEtD,0FAA0F;AAC1F,eAAO,MAAM,0BAA0B,GAAI,QAAQ,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,MAAM,OAAO,CAAC,IAAI,CAAC,KAAG,OAAO,CAAC,IAAI,CASvH,CAAC;AAEF,UAAU,YAAY;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wDAAwD;AACxD,eAAO,MAAM,MAAM,GAAI,MAAM,YAAY,GAAG,IAAI,GAAG,SAAS,KAAG,OAAwC,CAAC;AAKxG;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAU,CAAC,EACjC,WAAW,MAAM,EACjB,KAAK,MAAM,EACX,SAAS,MAAM,OAAO,CAAC,CAAC,CAAC,KACxB,OAAO,CAAC;IAAE,QAAQ,EAAE,CAAC,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAe1C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as modifySettings } from "./joinLocalRoom-
|
|
1
|
+
import { m as modifySettings } from "./joinLocalRoom-BWoS-8wt.js";
|
|
2
2
|
import { j as applyAudioProcessing } from "./audioProcessing-Ca5wm1nV.js";
|
|
3
|
-
import { L as streamSuccessAudio, N as streamSuccessScreen, P as streamSuccessVideo, o as disconnectSendTransportAudio, p as disconnectSendTransportScreen, q as disconnectSendTransportVideo } from "./updateParticipantAudioDecibels-
|
|
3
|
+
import { L as streamSuccessAudio, N as streamSuccessScreen, P as streamSuccessVideo, o as disconnectSendTransportAudio, p as disconnectSendTransportScreen, q as disconnectSendTransportVideo } from "./updateParticipantAudioDecibels-xKKq7Zp5.js";
|
|
4
4
|
const launchBackground = ({
|
|
5
5
|
updateIsBackgroundModalVisible,
|
|
6
6
|
isBackgroundModalVisible
|
|
@@ -3557,4 +3557,4 @@ export {
|
|
|
3557
3557
|
confirmRecording as y,
|
|
3558
3558
|
launchRecording as z
|
|
3559
3559
|
};
|
|
3560
|
-
//# sourceMappingURL=getParticipantMedia-
|
|
3560
|
+
//# sourceMappingURL=getParticipantMedia-CZbsFBth.js.map
|