1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-10 02:35:58 +01:00
Commit graph

80 commits

Author SHA1 Message Date
Juliusz Chroboczek
eb21c1ab20 Maintain stream information for oneself.
We used to maintain stream information for all users except oneself.
2022-03-25 18:21:03 +01:00
Juliusz Chroboczek
e303992e45 Call onuser when deleting stream. 2022-03-25 17:04:31 +01:00
Juliusz Chroboczek
55ae4a684b Remove parameter from the onpeerconnection callback.
The distinction is not likely to be useful, and it doesn't make
sense in all cases.
2022-03-23 00:11:12 +01:00
Juliusz Chroboczek
8d4bafe05c Tweak documentation of protocol.js. 2022-03-23 00:08:16 +01:00
Juliusz Chroboczek
34b21a2598 Add preference forceRelay.
This may be useful to get around network blocks in some cases.
2022-03-22 18:23:16 +01:00
Juliusz Chroboczek
d798cfec75 Fix simulcast statistics display for Firefox.
Firefox doesn't include the rid in the statistics result.
Use the SSID instead.
2022-03-20 22:34:39 +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
14ca47651b Fix data parameter of ServerConnection.join.
This was broken when we renamed status to data.  Thanks to
Sylvie Tissot.
2022-02-05 13:48:05 +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
29b4734bc4 Adapt typing to TypeScript 4.5.4. 2022-01-25 01:22:59 +01:00
Juliusz Chroboczek
f72061996c Fix error handling in gotClose. 2021-11-27 21:30:07 +01:00
Juliusz Chroboczek
09c5ba0d06 Protect against tracks without a stream. 2021-09-16 17:19:19 +02:00
Juliusz Chroboczek
b527c8757a Add chathistory message. 2021-07-31 14:42:26 +02:00
Juliusz Chroboczek
a25d46314a Fix documentation of onerror callback. 2021-07-30 17:40:15 +02:00
Juliusz Chroboczek
b9c1968b48 Treat closing unknown streams as a warning. 2021-07-16 23:10:13 +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
2da8faa8cf Implement per-stream requests. 2021-05-14 23:21:14 +02:00
Juliusz Chroboczek
c18ec32c85 Protect against closed streams in recomputeUserStreams. 2021-05-13 04:09:56 +02:00
Juliusz Chroboczek
795a40ceaf Simulcast. 2021-05-08 21:12:29 +02:00
Juliusz Chroboczek
acca3f9bb3 Maintain kinds of tracks in user data structure.
Needed to show in the user list whether a user is publishing a stream.
2021-04-29 21:10:04 +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
b7f39d3290 Remove last traces of onabort callback.
Everything now goes through onclose, both for up and down streams.
2021-04-27 17:10:34 +02:00
Alexandre Iooss
8da55c6e6c Remove async from ServerConnection.gotRenegotiate 2021-04-27 11:11:17 +02:00
Alexandre Iooss
4db8279016 Fix serverConnection not defined in ServerConnection.findByLocalId 2021-04-27 11:11:17 +02:00
Juliusz Chroboczek
016c321484 Fix typing of userMessage value. 2021-02-26 16:22:55 +01:00
Juliusz Chroboczek
e04193f78c Display user message when browser doesn't do WebRTC.
Thanks to mscherer for the report.
2021-02-14 18:06:50 +01:00
Juliusz Chroboczek
6054ae6cc6 Update client code for renegotiation.
We now need to deal with the case where a track disappears from the
labels array.
2021-02-03 20:26:05 +01:00
Juliusz Chroboczek
14a4303664 Rework connection replacement.
We used to signal connection replacement by reusing the same connection
id.  This turned out to be racy, as we couldn't reliably discard old
answers after a connection id was refused.

We now use a new id for every new connection, and explicitly signal
stream replacement in the offer message.  This requires maintaining a
local id on the client side.
2021-01-31 23:59:17 +01:00
Juliusz Chroboczek
7d216f650c Add replace parameter to onclose stream callback.
This indicates that the stream is being replaced by another one with
the same id.  This avoids moving videos around when they are being
renegotiated.
2021-01-17 20:20:35 +01:00
Juliusz Chroboczek
8168c2a9e6 Rework the up connection state machine.
It is now more similar to the down connection, using the onclose
callback for resource management.
2021-01-14 23:50:40 +01:00
Juliusz Chroboczek
371289793b Call onclose on up streams too. 2021-01-12 02:23:22 +01:00
Juliusz Chroboczek
820b303e84 Send localDescription instead of original SDP. 2021-01-11 20:41:34 +01:00
Juliusz Chroboczek
63e2b5a4c4 Implement 'noecho' field in client messages. 2021-01-11 16:30:07 +01:00
Antonin Décimo
056ffcd2cf Add missing semicolons. 2021-01-05 21:59:47 +01:00
Juliusz Chroboczek
d2f7010141 Call ondowntrack on each track.
We used to call it on just the first track.  Also remove obsolete
remains of the onlabel callback.
2021-01-04 20:43:39 +01:00
Juliusz Chroboczek
0ec9f92dad Make 'clearchat' into a user message. 2021-01-03 17:47:56 +01:00
Juliusz Chroboczek
e393819eda Carry raw SDP in the protocol. 2021-01-03 17:00:58 +01:00
Juliusz Chroboczek
f53276b89e Simplify the protocol and the protocol interface.
Split the id field into id and source, where source indicates the sender
of the message and id the entity being sent.  Remove the label request,
just use the offerer's username.  Maintain the username within the
ServerConnection, this removes a parameter from some methods.
2021-01-03 12:17:30 +01:00
Juliusz Chroboczek
a0418d26ec Send RTC configuration with joined message.
This avoids one HTTP request, and is potentially more flexible.
2020-12-28 02:55:19 +01:00
Juliusz Chroboczek
d09c0f0a80 Make the value field of client messages carry arbitrary types. 2020-12-28 01:49:27 +01:00
Juliusz Chroboczek
e3fd9a963a Improve error handling during negotiation. 2020-12-25 18:54:18 +01:00
Juliusz Chroboczek
d5c7a13aae Implement abort in the client->server direction. 2020-12-25 18:51:17 +01:00
Juliusz Chroboczek
66fb73d01e Relicense under the MIT licence. 2020-12-19 17:26:33 +01:00
Antonin Décimo
f5de94cf3e Correct spelling of privileged. 2020-12-15 14:52:46 +01:00
Juliusz Chroboczek
c6108f08d5 Allow renegotiate to be called on down streams. 2020-12-05 20:44:55 +01:00
Juliusz Chroboczek
f002a83806 Keep track of stream direction.
This simplifies the interface since close does the right thing
without help from the application.  Also improves error checking.
2020-12-05 20:44:42 +01:00