Commit Graph

214 Commits

Author SHA1 Message Date
Miroslav Šedivý
dfc7eb3882
Fix noisy errors (#49)
* send message error.

* read message error.

* close webrtc conn only if not closed yet.

* file upload no files received.
2023-05-19 17:19:38 +02:00
Miroslav Šedivý
3e8d686c0f
Bandwidth estimator refactor (#46)
* rewrite to use stream selector.

* WIP.

* add nacks to metrics.

* add estimate trend.

* estimator based on trend detector.

* add estimator unstable duration.

* add estimator debug.

* add stalled duration.

* estimator move values to config.

* change default estimator values.

* minor style changes.

* fix websocket video messages.

* replace video track with ivdeo id.
2023-05-15 19:29:39 +02:00
Miroslav Šedivý
cf4e0666fe add locked controls to settings. 2023-05-15 16:47:28 +02:00
Miroslav Šedivý
0ea1c2870f
Refactor websocket session sync (#44)
* refactor websocket peer and comment functions.

* update comments.

* add DestroyWebSocketPeer.
2023-04-23 11:23:20 +02:00
Miroslav Šedivý
728e27da34 minor changes, moving things around. 2023-04-18 12:07:49 +02:00
Miroslav Šedivý
43a649d2c4
websockets set max payload log size. (#42) 2023-03-31 12:02:19 +02:00
Miroslav Šedivý
a4a3ff79ad
Toggle estimator config (#32)
* add estimator to conifg.

* ensure video auto is false when estimator is disabled.
2023-02-26 21:54:10 +01:00
Miroslav Šedivý
f8b128e1e9
Custom sizes with XRandR (#25)
* xserver dummy with RandR.

* update.

* remove screen configurations from xorg.

* screen size cannot be nil anymore.

* use predefined screen configurations.

* use screen configurations.

* fix error.

* remove comment.
2023-02-14 21:18:47 +01:00
Miroslav Šedivý
2364facd60
WebRTC congestion control (#26)
* Add congestion control

* Improve stream matching, add manual stream selection, add metrics

* Use a ticker for bitrate estimation and make bandwidth drops switch to lower streams more aggressively

* Missing signal response, fix video auto bug

* Remove redundant mutex

* Bitrate history queue

* Get bitrate fn support h264 & float64

---------

Co-authored-by: Aleksandar Sukovic <aleksandar.sukovic@gmail.com>
2023-02-06 19:45:51 +01:00
Miroslav Šedivý
2cb64d15a0
send heartbeat with ping. (#16) 2022-11-11 17:58:54 +01:00
Miroslav Šedivý
6067367acd
Capture bandwidth switch (#14)
* Handle bitrate change by finding the stream with closest bitrate as peer

* Convert video id into bitrate when creating peer or changing bitrate

* Try to fix prometheus panic

* Revert metrics label name change

* minor fixes.

* bitrate selector.

* skip if moving to the same stream.

* no closure for getting target bitrate.

* fix: high res switch to lo video, stream bitrate out of range

* revert dev config change.

* white space.

Co-authored-by: Aleksandar Sukovic <aleksandar.sukovic@gmail.com>
2022-10-25 20:25:00 +02:00
Miroslav Šedivý
5ad5daa6bb
Stream bucket manager (#12)
* refactor webrtc.

* bind track with a single connection.

* audio+video codec.

* move stream selection to bucket manager.

* audio w/o bucket manager.

* revert peer changes.

* return video IDs.

* destroy & recreate all.

* add video ID change.

* Track -> Recevier.
2022-10-17 13:39:31 +02:00
Miroslav Šedivý
691150900b
Temporary websocket disconnect handling (#6)
* fix websocket close log error.

* logger session interface no pointer.

* websocket delayet disconnect.

* session host: save id not pointer to a session.

* fix if hostId not stored.
2022-08-26 20:16:40 +02:00
Miroslav Šedivý
a6813f994c ws control buttons & keys add optional pos. 2022-07-28 12:43:31 +02:00
Miroslav Šedivý
7d5ec0190a add button events to control WebSocket. 2022-07-28 12:43:31 +02:00
Miroslav Šedivý
f4a4e0152e webrtc SetCursorPosition. 2022-07-28 12:43:31 +02:00
Miroslav Šedivý
81531d74c1 websocket move cursor & scroll. 2022-07-28 12:43:31 +02:00
Miroslav Šedivý
babddacbf3
Go generics and changes in v1.18 (#5)
* ArrayIn to use generics.

* interface{} -> any.
2022-07-28 12:20:20 +02:00
Miroslav Šedivý
3cd59b9f30 rename module name from gitlab to github. 2022-07-14 22:10:41 +02:00
Miroslav Šedivý
d5425ea457 clipboard set for control paste. 2022-05-03 19:57:31 +00:00
Miroslav Šedivý
61059c9b3c revert backwards compatibility. 2022-04-19 10:16:59 +00:00
Miroslav Šedivý
7d53e59945 properly clear inactive cursors. 2022-03-27 00:26:11 +01:00
Miroslav Šedivý
81867d811b sessions: switch to settings struct. 2022-03-27 00:08:06 +01:00
Miroslav Šedivý
d004ddd68f private mode implementation. 2022-03-26 23:20:38 +01:00
Miroslav Šedivý
8593d2d0fd move shared code to pkg. 2022-03-20 11:43:00 +01:00
Miroslav Šedivý
94c17e9a42 rename module to gitlab.com/demodesk/neko/server. 2022-03-20 11:27:41 +01:00
Miroslav Šedivý
d108343ced Logs JSON output. 2022-03-07 10:05:02 +00:00
Miroslav Šedivý
d20fa071e7 register negotiation event after initial offer. 2022-02-10 23:39:52 +01:00
Miroslav Šedivý
26ab7fa12d add control cut. 2022-01-30 17:53:22 +01:00
Miroslav Šedivý
e8c7ab421a control actions with requests. 2022-01-30 17:52:50 +01:00
Miroslav Šedivý
f6eb8d0315 ws handler simplify logging. 2022-01-30 17:47:28 +01:00
Miroslav Šedivý
fcc85aa9d6 desktop control websocket. 2022-01-30 01:25:04 +01:00
Miroslav Šedivý
7b2c1570bf add SDP answer. 2021-11-28 18:36:47 +01:00
Miroslav Šedivý
44e74e3088 implement signal offer. 2021-11-25 00:07:17 +01:00
Miroslav Šedivý
097e8d2a87 Inactive cursors - multiple positions. 2021-11-12 15:27:05 +00:00
Miroslav Šedivý
15cb4300a5 cursors add currentEmpty. 2021-11-07 21:23:23 +01:00
Miroslav Šedivý
6b77f54b8c inactiveCursors to own func. 2021-11-03 23:52:44 +01:00
Miroslav Šedivý
437eb44003 inactive cursors access control. 2021-11-03 21:59:38 +01:00
Miroslav Šedivý
6fa2f4513f add InactiveCursors to ws init. 2021-11-01 18:38:16 +01:00
Miroslav Šedivý
3528766e7f inactive cursors to config. 2021-11-01 17:49:02 +01:00
Miroslav Šedivý
1025eedc22 inactive cursor length rewrite. 2021-10-26 22:35:38 +02:00
Miroslav Šedivý
78e4c38264 lastEmpty session cursors. 2021-10-26 21:07:57 +02:00
Miroslav Šedivý
0b5e064cab add sessions cursors. 2021-10-24 01:09:41 +02:00
Miroslav Šedivý
e45bd7098f replace chan struct{}. 2021-10-04 14:40:20 +02:00
Miroslav Šedivý
d91c0a9f7f move websocket Ping to peer. 2021-09-24 15:15:59 +02:00
Miroslav Šedivý
51577ecff4 screen size retype one struct. 2021-09-20 18:28:13 +02:00
Miroslav Šedivý
f96466b7b9 websocket upgrade as router handler. 2021-09-18 14:59:15 +02:00
Miroslav Šedivý
fd9d5ec6f8 websocket shutdown + log. 2021-09-18 13:41:20 +02:00
Miroslav Šedivý
137614c087 fix deadlock. 2021-09-18 00:56:03 +02:00
Miroslav Šedivý
5a7cdd31fe http refactor. 2021-09-17 00:24:33 +02:00