@anonotf/connect 0.4.0 → 0.4.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/package.json +1 -1
- package/src/calls.js +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anonotf/connect",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Client SDK for AnonOtF — calls, group calls, live streaming, chat, and voice notes, without touching raw WebRTC or Socket.IO directly.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
package/src/calls.js
CHANGED
|
@@ -101,7 +101,12 @@ export class Calls {
|
|
|
101
101
|
end() {
|
|
102
102
|
this._socket.emit('end-call', { otherParty: this._anyPeerId() });
|
|
103
103
|
this._cleanupAll();
|
|
104
|
-
|
|
104
|
+
// Deliberately does NOT emit 'callEnded' here — you already know
|
|
105
|
+
// the call ended, you just called end(). Firing it anyway created
|
|
106
|
+
// an infinite loop for any consumer whose 'callEnded' handler
|
|
107
|
+
// reasonably calls end()/cleanup again (the natural thing to do).
|
|
108
|
+
// 'callEnded' is for when the call ends from elsewhere — the
|
|
109
|
+
// other party hanging up, a peer connection failing, etc.
|
|
105
110
|
}
|
|
106
111
|
|
|
107
112
|
/** Notify everyone in the call that you've started/stopped a local recording. */
|