Juliusz Chroboczek
1b492114ad
Fix typo in permissionsChangedAction.
2022-03-04 22:23:25 +01:00
Juliusz Chroboczek
de3a016f4d
Set the username in the server when using tokens.
...
This avoids the need to pass the username in the URL without
requiring the client to parse tokens.
2022-02-20 15:33:11 +01:00
Juliusz Chroboczek
a86fb08f6c
Replace ClientPermissions with a list of strings.
...
Now that we support external auth, the permissions list is
open-ended. Make it a list for simplicity.
2022-02-19 23:44:57 +01:00
Juliusz Chroboczek
03811db37d
Implement token authentication.
2022-02-18 13:35:17 +01:00
Juliusz Chroboczek
24187430e8
Rename client status to data, add group data.
...
We now distinguish between status, which is maintained by the server,
and data, which is provided by the client. In addition to client data,
we now support group data.
2022-01-29 23:28:08 +01:00
Juliusz Chroboczek
710cc3cc14
Add ability to set initial user status.
...
Setting the status after joining (using the "setstatus" action)
may cause multiple "user" messages to be sent to clients. Add
the ability to set the initial status at join time.
2022-01-28 22:21:19 +01:00
Juliusz Chroboczek
39976d6d0d
Protect webClient.actions with its own mutex.
...
(*webClient).action may be called with the group mutex taken,
and therefore cannot take the client mutex.
2021-12-11 01:33:47 +01:00
Juliusz Chroboczek
abed33d654
Fix missing line break in subgroups command.
2021-11-29 17:33:46 +01:00
Juliusz Chroboczek
c7c3c9c6b0
Export group status in .status.json.
2021-10-30 19:12:06 +02:00
Juliusz Chroboczek
019f365981
Remove accessors for group description fields.
...
Consult the description directly.
2021-10-30 18:34:35 +02:00
Juliusz Chroboczek
869eb9b839
Move password checking into group.go.
...
It used to be delegated to clients.
2021-10-27 04:15:44 +02:00
Juliusz Chroboczek
09c5ba0d06
Protect against tracks without a stream.
2021-09-16 17:19:19 +02:00
Juliusz Chroboczek
e81ee4af5e
Remove userId and userName from rtpconn.
...
They're redundant with the client field.
2021-09-16 16:53:44 +02:00
Juliusz Chroboczek
f683675ab4
Use a dedicated error value for anonymous users.
2021-09-09 22:26:08 +02:00
Juliusz Chroboczek
48a9b10ce8
Use spatial scalability when simulcast is not available.
...
If the client requested a low-resolution stream and there is none,
switch to SID=0.
2021-08-03 13:14:11 +02:00
Juliusz Chroboczek
3d21a79880
Don't carry up tracks explicitly.
...
Left over from the old data structure.
2021-08-03 02:51:44 +02:00
Juliusz Chroboczek
51c31ab729
Improve error handling for negotiation failures.
...
Now that we constrain tracks in offers properly, there is no need
to manually check that the codecs have been matched correctly.
2021-08-02 20:00:23 +02:00
Juliusz Chroboczek
816b7a54df
Restrict negotiation of downstream codecs, allow multiple profiles.
...
We now restrict the allowable codecs in the downstream direction,
which leads to a clean failure instead of a silent track. We also
allow multiple profiles for a single codec.
2021-08-02 18:08:37 +02:00
Juliusz Chroboczek
efb298f002
Use sendonly transceiver for down tracks, embed receiver in track.
2021-08-01 13:33:01 +02:00
Juliusz Chroboczek
b527c8757a
Add chathistory message.
2021-07-31 14:42:26 +02:00
Juliusz Chroboczek
97a5bf60ad
Send the locked user-friendly message in the group status.
2021-07-30 19:44:39 +02:00
Juliusz Chroboczek
3b98e123e0
Send a message of kind "kicked" instead of "error".
2021-07-30 19:38:02 +02:00
Juliusz Chroboczek
a5c97fd849
Add System permission.
...
This replaces the OverridePermissions method, and is communicated
to clients that can reliably and safely identify a system user.
2021-07-30 19:26:34 +02:00
Juliusz Chroboczek
52a26327d7
Implement group status.
...
We now inform clients of the status of a group (locked, etc.). Also
cleans up the handling of administrative messages, which solves the
issue of receiving "user" before "joined".
2021-07-16 19:51:54 +02:00
Juliusz Chroboczek
6ae79f21d6
Use unbounded buffer for track actions.
...
Without that, we might deadlock if the reader is blocked in read.
2021-07-16 03:03:45 +02:00
Juliusz Chroboczek
c540cad994
Move pushClientConnection into its own function.
2021-07-16 01:40:42 +02:00
Juliusz Chroboczek
053067548a
Ensure that replaced down tracks are closed even on failure.
...
Thanks to Ludovic Rateau.
2021-07-15 23:52:03 +02:00
Juliusz Chroboczek
9b8d868647
Fix a race between delUpConn and addLocal.
...
We could call addLocal after the remote was closed, which
would cause the local connection to remain forever.
Thanks to Ludovic Rateau.
2021-07-15 16:03:06 +02:00
Juliusz Chroboczek
36d31f0db8
Maintain a reference to the connection associated to each track.
...
This avoids carrying an extra parameter in many places.
2021-07-14 14:05:23 +02:00
Juliusz Chroboczek
2da8faa8cf
Implement per-stream requests.
2021-05-14 23:21:14 +02:00
Juliusz Chroboczek
515c4a5cd0
Rename pushConns to requestConns, move into Client interface.
...
Also allow selecting just a single connection.
2021-05-14 23:21:14 +02:00
Juliusz Chroboczek
6f9d7fc306
Scalable video coding (SVC).
2021-05-14 23:21:14 +02:00
Juliusz Chroboczek
7590588a54
Don't renegotiate if nothing changed during a request.
2021-05-14 18:19:44 +02:00
Juliusz Chroboczek
d236f4c6df
Work around empty track id and msid.
2021-05-13 03:45:32 +02:00
Juliusz Chroboczek
26bf8a341a
Don't send client parameters in delete message.
...
This avoids a race condition since the delete messages are sent
asynchronously.
2021-05-10 16:58:28 +02:00
Juliusz Chroboczek
795a40ceaf
Simulcast.
2021-05-08 21:12:29 +02:00
Juliusz Chroboczek
be73380f9f
Label streams, not tracks.
...
We used to label tracks individually, in a view to using the labelling
for simulcast. Since then, the WebRTC community has converged on a
different strategy, where multiple tracks share a single mid and
are labelled with the rid extension.
We now label whole streams, which is simpler, and use the track's
kind (and, in the future, the rid) to disambiguate. This changes the
protocol in two ways:
* in offers, the "labels" dictionary is replaced by a single "label"
field; and
* the syntax of the "request" message has changed.
2021-04-29 18:28:16 +02:00
Juliusz Chroboczek
3ba2394be7
Implement user statuses.
...
The server now maintains a set of statuses for each user that are not
interpreted by the server but communicated to the other members of the
group using 'user' messages.
2021-04-28 17:01:05 +02:00
Juliusz Chroboczek
f0a39fca48
Send user permissions to client.
...
We now maintain the user list in the serverConnection.
2021-04-28 00:07:19 +02:00
Juliusz Chroboczek
fef38bc53f
Protect against requesting when no group is joined.
...
Thanks to gregfr.
2021-04-15 12:07:05 +02:00
Juliusz Chroboczek
ea321be17a
Make Kick part of the Client interface.
...
All clients implement Kick, no need for a separate interface.
2021-02-26 16:20:13 +01:00
Juliusz Chroboczek
ddb6039fa6
Fix error handling in client actions.
...
Thanks to Yacine.
2021-02-17 20:55:11 +01:00
Juliusz Chroboczek
260597d595
Ensure actions happen in order.
2021-02-15 00:35:09 +01:00
Juliusz Chroboczek
183ab4fed7
Use an unbounded buffer for client actions.
...
We no longer risk deadlocking when sending actions, which in turn
enables pushing connections synchronously.
2021-02-14 17:24:42 +01:00
Juliusz Chroboczek
3b505a89fe
Factor out handling actions.
2021-02-14 16:47:36 +01:00
Juliusz Chroboczek
3c7b32056b
Reduce writer timeout, increase amount of buffering.
...
If the writer gets congested, the whole group might be delayed. Better
to drop the slow client in that case.
2021-02-14 16:26:56 +01:00
Juliusz Chroboczek
0261558e07
Protect against empty ids.
2021-02-05 16:07:58 +01:00
Juliusz Chroboczek
c3a19c9128
Avoid race between closing connections and terminating client.
...
We need to terminate all down connections synchronously, otherwise
we risk leaving open connections lying around.
2021-02-05 12:20:33 +01:00
Juliusz Chroboczek
66de0d16e7
Fix closing of replaced connections.
2021-02-04 23:51:51 +01:00
Juliusz Chroboczek
0ce509c62c
Revert "Log client errors."
...
We're already logging in the caller.
This reverts commit f4811e8cf5
.
2021-02-04 22:44:14 +01:00