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
Juliusz Chroboczek
1c5bce2a38
Improve documentation for protocol functions.
2020-12-05 20:29:03 +01:00
Juliusz Chroboczek
9bb2499b85
Rework flushing of ICE candidates.
...
We now treat local and remote candidates differently, and flush
local candidates immediately after sending an offer.
2020-12-05 20:29:03 +01:00
Juliusz Chroboczek
2546aae7c1
Eliminate login from protocol.
...
The login message is replaced with handshake, which only carries
the client id. Username and password is now in the join message.
Permissions is replaced with joined.
2020-12-02 13:49:53 +01:00
Antonin Décimo
7d4dabe30f
JSDoc doesn't recognize {Promise<void>[]}, use {Array.<>}.
2020-12-01 21:07:44 +01:00
Antonin Décimo
22f9442cf4
Fix typos.
2020-12-01 21:07:44 +01:00
Juliusz Chroboczek
aa71205fa2
Include username and id in group and user actions.
2020-11-30 20:04:58 +01:00
Juliusz Chroboczek
6040d1943c
Allow forwarding usermessages.
...
They now have the same format as chat messages; the only difference
is that they are not stored in the chat history.
Also adds userMessage method to ServerConnection.
Fix usermessages.
2020-11-30 14:39:36 +01:00
Juliusz Chroboczek
4911b7ad38
Buffer local ICE candidates.
...
Apparently, it is possible for an ICE candidate to be generated
before onnegotiationneeded triggers. Avoid losing a candidate
in that case.
2020-10-30 00:35:36 +01:00
Juliusz Chroboczek
66dd71678e
Implement private messages.
2020-10-01 16:59:09 +02:00
Juliusz Chroboczek
3bd9a1db4e
Timestamp chat messages.
2020-09-30 00:54:12 +02:00
Juliusz Chroboczek
480922268e
Some more tweaks to JS typing.
2020-09-29 18:16:54 +02:00
Juliusz Chroboczek
0aa77441bd
Improve typing of javascript code.
...
We now enable typing of sfu.js.
2020-09-20 17:25:41 +02:00
Juliusz Chroboczek
eab848f2cf
Add ability to receive nothing.
2020-09-18 20:09:52 +02:00
Juliusz Chroboczek
f8ae908d7a
Implement message for locked groups.
2020-09-18 11:40:00 +02:00
Juliusz Chroboczek
e824b93584
Improve error handling in ServerConnection.connect.
2020-09-18 11:28:13 +02:00
Juliusz Chroboczek
b2f01a528e
Fix URL in ServerConnection.connect.
2020-09-18 11:24:33 +02:00
Antonin Décimo
5ad4df5a45
Add missing semicolons.
2020-09-14 17:23:06 +02:00
Juliusz Chroboczek
7707775cca
Implement user-readable message for kick.
2020-09-12 12:26:07 +02:00
Juliusz Chroboczek
5c97e739a6
Implement activity detection.
2020-09-11 23:43:30 +02:00
Juliusz Chroboczek
8d9c3d7d1c
Add userdata field to ServerConnection and Stream.
2020-09-11 21:39:18 +02:00
Juliusz Chroboczek
346f93dd16
Maintain information about whether renegotiation is permitted.
...
Renegotiation is not correct when the stream is fresh, for example
after the user has switched the camera.
2020-09-10 01:33:23 +02:00
Juliusz Chroboczek
c0122c069e
Implement restartIce for older browsers.
2020-09-03 20:19:26 +02:00
Juliusz Chroboczek
a4b528e1e7
Implement onnegotiationcompleted callback.
2020-08-26 18:30:29 +02:00
Juliusz Chroboczek
fba0dded84
Type global variables in sfu.js.
2020-08-24 22:31:22 +02:00
Juliusz Chroboczek
8fbd16cc8c
Minor tweaks to error handling.
2020-08-19 14:39:40 +02:00
Juliusz Chroboczek
33bfb433f1
Mark async functions explicitly in protocol.js.
...
JSDoc doesn't recognise them otherwise.
2020-08-14 14:44:23 +02:00
Juliusz Chroboczek
7848822469
Minor type tightenings in protocol.js.
2020-08-14 14:36:29 +02:00
Juliusz Chroboczek
0102bdc128
Fix typo in gotAbort.
2020-08-13 20:11:21 +02:00
Juliusz Chroboczek
04b0951530
Fix fetching of ICE servers.
2020-08-13 15:45:19 +02:00
Juliusz Chroboczek
3e0bb08955
Split out the javascript protocol interface.
2020-08-13 12:21:29 +02:00