Commit graph

33 commits

Author SHA1 Message Date
Joachim Bauch 800ece1d90
Support combining ping requests of different rooms on the same backend. 2022-05-17 16:38:16 +02:00
Joachim Bauch c0f56ff81a
Merge pull request #239 from strukturag/toggle-audio-video
Support toggling audio/video in subscribed streams.
2022-05-10 11:39:10 +02:00
Joachim Bauch ec7bc6874e
Remove redundant check for "nil" (fixes linter error). 2022-05-10 10:52:19 +02:00
Daniel Calviño Sánchez 3f7ebc8ef9 Fix "signaling_server_messages_total" stat not being incremented
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-05-03 13:56:35 +02:00
Daniel Calviño Sánchez 3636e69dba Add specific ID for connections
A new ID is introduced for publishers and subscribers to be able to
identify different connections in the same session. While it was
possible to do that from the Janus handles this ID is meant to be shared
with the clients and set by the peer sending the offer, so it is set by
the client for publishers and by the signaling server for subscribers
(in which case the Janus handle is used).

This will make possible to know without any ambiguity if an offer/answer
belongs to an already existing connection or not. This can be used, for
example, to know if an offer represents an update or a new connection,
or to discard unneeded messages that might be sent in some corner cases
by the clients.

The ID name is "sid" for consistency with the property name used by the
internal signaling server of Talk.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-04-27 11:14:59 +02:00
Joachim Bauch 5f97794691
Send directly to local session with disconnected client.
Before it was using NATS to deliver the message to the session.
2022-04-11 16:53:47 +02:00
Joachim Bauch 97f2a1d5f0
Add special events to update "incall" flags of all sessions. 2022-03-23 09:15:22 +01:00
Joachim Bauch 8fd9c688b6
Merge pull request #195 from danxuliu/send-updated-offers-to-subscribers-after-publisher-renegotiations
Send updated offers to subscribers after publisher renegotiations
2022-02-25 09:16:10 +01:00
Daniel Calviño Sánchez cd93db60a4 Introduce feature flag for SDP updates
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-02-25 07:47:30 +01:00
Joachim Bauch fca30af201
Add API for transient room data. 2022-02-16 12:30:39 +01:00
Joachim Bauch 76ad24ca62
Include room session id in "joined" events.
This helps with matching signaling sessions with sessions in Talk.
2021-12-17 16:02:22 +01:00
Joachim Bauch 707b125730
Check individual audio/video permissions on change.
If a client publishes audio/video and no longer has the video permission,
the whole publisher will be closed. Previously this was only checking
the generic "media" permission.
2021-11-08 12:08:14 +01:00
Joachim Bauch a05acc9cb4
Include available features in header of backend requests to Nextcloud.
The header "X-Spreed-Signaling-Features" will contain a comma-separated list
of feature flags.
2021-11-03 15:24:27 +01:00
Joachim Bauch 70b37364d3
Support separate permissions for publishing audio / video.
Clients with permission "publish-media" can publish any audio/video. Other
clients need to have "publish-audio" and/or "publish-video" to publish the
corresponding media types. For this the SDP in the offer is parsed to check
what will be sent.
2021-11-03 15:24:25 +01:00
Joachim Bauch c51276596b
Internal clients always may subscribe all streams.
Follow-up to #133.
2021-10-11 13:44:54 +02:00
Joachim Bauch a663dd43f9
Add option to allow subscribing of any streams (disabled by default). 2021-09-23 09:05:49 +02:00
Joachim Bauch b398591447
Only allow subscribing if both users are in the same room and call.
Previously it was possible to subscribe any stream if the session id of the
publisher was known.
2021-09-23 09:05:25 +02:00
Joachim Bauch 6841d1495f
Fixup: don't decrement virtual sessions twice. 2021-08-10 08:50:41 +02:00
Joachim Bauch ce1b3fc6e2
Add more metrics on rooms / sessions / backends. 2021-08-10 08:50:41 +02:00
Joachim Bauch e40e86f32c
Merge pull request #104 from strukturag/stream-selection-api
Add API to select a simulcast substream / temporal layer.
2021-07-01 08:54:11 +02:00
Joachim Bauch 8a87a0d602
Add feature flag "simulcast". 2021-06-08 13:49:09 +02:00
Joachim Bauch 0a8ce3bda3
Add API to select a simulcast substream / temporal layer. 2021-06-08 13:49:08 +02:00
Joachim Bauch 9d2ad0f243
Notify new clients about current flags of virtual sessions. 2021-06-08 13:46:25 +02:00
Joachim Bauch 2f4414561e
No need to include trailing newline in log messages. 2021-06-04 16:42:17 +02:00
Joachim Bauch 0b2df54343
Send hello response through session. 2021-06-04 15:46:22 +02:00
Joachim Bauch 21f3f506d1
Send more responses through the session to handle disconnected / resuming clients. 2021-06-04 15:40:43 +02:00
Joachim Bauch 15d5c93b0b
Support session resumption while a room is being joined.
If a client resumed a session while a (slow) backend request to join a room
was still active, the response could get lost.
2021-06-04 15:40:42 +02:00
Joachim Bauch c8e4bfe007
Fix various issues found by golangci-lint. 2021-04-26 17:25:52 +02:00
Joachim Bauch 8052df4ef5
Wait for clients to be terminated before destroying hub in tests.
This should help with the flaky test failures on CI.
2021-04-23 15:12:09 +02:00
Joachim Bauch a5faca00cd
Pass backend when fetching room for managing virtual sessions.
The internal room id is different depending on the backend.
2021-04-23 14:39:42 +02:00
Joachim Bauch 047e6655a1
Remove unnecessary assignments. 2021-04-21 14:12:11 +02:00
Joachim Bauch 0dd2e8a086
Remove remaining virtual sessions if client session is closed.
Previously any virtual sessions that have not been explicitly closed were
not removed from the backend if the client session was closed / expired.
2021-04-21 14:05:45 +02:00
Joachim Bauch 8ba2e0ad64
Switch dependency tracking to Go modules.
With that bump minimum required version to Go 1.13.
2021-04-09 16:15:00 +02:00
Renamed from src/signaling/hub.go (Browse further)