buzz-me-in 2.2.0-beta.2 → 2.2.0-beta.3
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/homekit.js +12 -2
- package/package.json +1 -1
package/homekit.js
CHANGED
|
@@ -558,8 +558,14 @@ function _stopSession(sessionID, hangUp) {
|
|
|
558
558
|
if (s.ffOut) killFfmpeg(s.ffOut);
|
|
559
559
|
if (s.sdpPath) removeReturnAudioSdp(s.sdpPath);
|
|
560
560
|
|
|
561
|
+
// Only the last session ending means the user is finished. HomeKit runs up
|
|
562
|
+
// to cameraStreamCount sessions at once, and moving between the room view's
|
|
563
|
+
// camera tile and the full camera view starts a second one, so a STOP here
|
|
564
|
+
// routinely arrives while another session is still streaming. Hanging up on
|
|
565
|
+
// it kills a live call: seen on 2026-09-12, where session ac5c8c21 stopping
|
|
566
|
+
// ended the call under session d332e46a three seconds into the stream.
|
|
561
567
|
const activeCall = getActiveCall();
|
|
562
|
-
if (hangUp && activeCall) {
|
|
568
|
+
if (hangUp && activeCall && activeSessions.size === 0) {
|
|
563
569
|
scheduleHangUp(activeCall.callSid, sessionID);
|
|
564
570
|
}
|
|
565
571
|
}
|
|
@@ -920,8 +926,12 @@ module.exports = {
|
|
|
920
926
|
shutdown,
|
|
921
927
|
// Exported for tests/homekit-hangup-grace.test.cjs. Reaching the deferred
|
|
922
928
|
// hangup through the streaming delegate would mean standing up a full SRTP
|
|
923
|
-
// session, which tests nothing about the timer.
|
|
929
|
+
// session, which tests nothing about the timer. _stopSession and the session
|
|
930
|
+
// map go with them: driving only scheduleHangUp tests when the timer fires
|
|
931
|
+
// but not whether it should have been set, which is where the live bug was.
|
|
924
932
|
scheduleHangUp,
|
|
925
933
|
cancelPendingHangUp,
|
|
926
934
|
deferPendingHangUp,
|
|
935
|
+
_stopSession,
|
|
936
|
+
activeSessions,
|
|
927
937
|
};
|