@yeaft/webchat-agent 1.0.435 → 1.0.436
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.
|
@@ -234,6 +234,12 @@ export async function handleClientBrowser(client, msg, checkAgentAccess) {
|
|
|
234
234
|
connectionGeneration: peer.connectionGeneration,
|
|
235
235
|
};
|
|
236
236
|
try {
|
|
237
|
+
// Commit the Web endpoint's scoped ICE credentials before the Agent can
|
|
238
|
+
// synchronously answer `browser_peer_prepare`. Otherwise a fast Agent
|
|
239
|
+
// may produce `browser_peer_prepared` while this field is still unset,
|
|
240
|
+
// causing the Web RTCPeerConnection to be created with no ICE servers.
|
|
241
|
+
peer.webIceServers = mintBrowserIceServers({ ...commonScope, endpointRole: 'web' });
|
|
242
|
+
peer.state = 'preparing';
|
|
237
243
|
await sendToAgent(agent, {
|
|
238
244
|
type: 'browser_peer_prepare',
|
|
239
245
|
agentId,
|
|
@@ -247,8 +253,6 @@ export async function handleClientBrowser(client, msg, checkAgentAccess) {
|
|
|
247
253
|
iceTransportPolicy: CONFIG.browserRuntime.iceTransportPolicy,
|
|
248
254
|
agentIceServers: mintBrowserIceServers({ ...commonScope, endpointRole: 'agent' }),
|
|
249
255
|
});
|
|
250
|
-
peer.webIceServers = mintBrowserIceServers({ ...commonScope, endpointRole: 'web' });
|
|
251
|
-
peer.state = 'preparing';
|
|
252
256
|
} catch (error) {
|
|
253
257
|
deleteBrowserPeer(peer.peerId);
|
|
254
258
|
return fail(client, msg, 'browser_peer_prepare_failed', String(error?.message || error).slice(0, 500));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.
|
|
1
|
+
{"version":"1.0.436"}
|
package/package.json
CHANGED