Commit graph

210 commits

Author SHA1 Message Date
sergystepanov
8361215a84 Fix 1px edge artifact in FF when flipped 2026-07-01 12:35:51 +03:00
sergystepanov
728b2a49f0
Add GStreamer (#504)
Old media pipe was replaced with GStreamer (go-gst). It is now possible
to change encoders to any supported by GStreamer, provided the necessary
plugins are installed on the system where cloud-retro is running. See
params in config.go.
2026-06-28 22:20:31 +03:00
sergystepanov
e3b16d5feb Use client-side stream vertical flip
Previously we used zero-cost x264 `X264_CSP_VFLIP` and vpx
`vpx_img_flip` for OpenGL cores (which render their output buffers
upside down). Now the flip is handled client-side during GPU compositing
of the video stream.
This will be needed later, when we have to use more codecs and
Gstreamer.
2026-06-13 17:53:37 +03:00
sergystepanov
2897339258 Remove Firefox pointer workaround and clean up imports 2026-06-11 20:36:42 +03:00
sergystepanov
e53f31073f Delay pointer controls in fullscreen to avoid weird jumps in Zen (FF) 2026-06-09 23:57:12 +03:00
sergystepanov
7adddee6ff Reformat screen.js 2026-06-09 23:54:02 +03:00
sergystepanov
57168067d9 Guard remote ICE candidates against null peer connection 2026-06-09 20:00:51 +03:00
sergystepanov
7442ff7e42 Reset ICE buffering on the client on ICE restarts 2026-06-09 15:10:08 +03:00
sergystepanov
86ee0cb380 Create the main data channel without negotiation
There is no point in previously pushing or pulling this channel, since we won't change any of its configuration parameters.
2026-06-09 15:10:07 +03:00
sergystepanov
c5886c5b1b Add connection time logging to WebRTC handler 2026-06-08 16:47:18 +03:00
sergystepanov
6fff575817 Use state from the WebRTC stat reports for RTT
Previous fix #844d84b doesn't work in Chrome, so this is another method
for better FF/Chrome compatibility.
2026-06-06 22:52:53 +03:00
sergystepanov
9b3d873907 It is time to update copyleft year 2026-06-06 18:35:11 +03:00
sergystepanov
a4b4e0458f Unify all WebRTC signaling in the API
Users, workers, and the coordinator will now send WebRTC signaling
information through a single API endpoint with a unified structure. The
payload should contain either an sdp or ice field for further processing
by the designated handlers.

Replaced API endpoints:
  - (101) WebrtcOffer -> WebrtcSignal
    Removed API endpoints:
  - WebrtcAnswer (102)
  - WebrtcIce (103)
2026-06-06 18:19:07 +03:00
sergystepanov
f72202684f Remove Base64 encoding of wire data 2026-06-06 15:31:13 +03:00
sergystepanov
fa783dc7cd Add init method into WebRTC Signalling 2026-06-06 14:20:17 +03:00
sergystepanov
844d84b6ac Use RTT stats from the selected ICE pair in the stats 2026-06-06 12:58:23 +03:00
sergystepanov
eaed44a03f Add direct siganlling dependency in the WebRTC module 2026-06-06 11:51:51 +03:00
sergystepanov
3388a0fbce Create data channels when pushed to the server 2026-06-05 14:46:55 +03:00
sergystepanov
25f42ee789 Revert "Enable client offer by default"
This reverts commit 2cb852926d.
2026-06-05 00:01:40 +03:00
sergystepanov
2cb852926d Enable client offer by default 2026-06-04 23:43:21 +03:00
sergystepanov
d9a13f006c Disable renegotiation when ICE fails 2026-06-04 23:11:45 +03:00
sergystepanov
bc17b1c2a0 Set to wait remote offer by default 2026-06-04 22:54:23 +03:00
sergystepanov
4dfc001a76 Exit when peer connection is not set 2026-06-04 22:50:48 +03:00
sergystepanov
d6f2cfc5ef Add the option switch for WebRTC initiator 2026-06-04 22:36:36 +03:00
sergystepanov
e96cee3cfa Reformat settings.js 2026-06-04 22:36:35 +03:00
sergystepanov
8c4b4bf96f Add an option for initiating WebRTC offer on the client side
WebRTC negotiation will start in the browser with an offer. Added because a reversed negotiation (server's offer) doesn't work in Firefox-based browsers.
2026-06-04 22:36:35 +03:00
sergystepanov
97a0d0a4c5 Add fullscreen FPS info 2026-06-04 22:36:34 +03:00
sergystepanov
f6a933799f Change WEBRTC_SDP event naming 2026-06-04 22:36:34 +03:00
sergystepanov
61020ec78f Reformat event.js 2026-06-04 22:36:33 +03:00
sergystepanov
35a23224ab Set ICE prefetch 2026-06-04 22:36:33 +03:00
sergystepanov
c5b7748f95 Close connection when rtc state changes 2026-06-04 22:36:33 +03:00
sergystepanov
637fd81452 Detach WebRTC handlers before close 2026-06-04 22:36:33 +03:00
sergystepanov
8c890f0c8e Clean webrtc.js 2026-06-04 22:36:33 +03:00
sergystepanov
fb926e6d2d Push WEBRTC_READY when connected 2026-06-04 22:36:32 +03:00
sergystepanov
5757e3bac6 Push ICE candidates right away 2026-06-04 22:36:32 +03:00
sergystepanov
7c604e94fb Reformat socket.js 2026-06-04 22:36:31 +03:00
sergystepanov
4d5a1c7778 Remove INIT_WEBRTC API call 2026-06-04 22:36:31 +03:00
sergystepanov
a8f4860b35 Fix close binding 2026-06-04 22:36:31 +03:00
sergystepanov
e541f7e183 Add InitWebrtcStream API call 2026-06-04 22:36:31 +03:00
sergystepanov
df8d35f542 Clean WebRTC export 2026-06-04 22:36:31 +03:00
sergystepanov
fd596fa85f Reformat api.js 2026-06-04 22:36:30 +03:00
sergystepanov
f50b37c11f Update webrtc.js 2026-06-04 22:36:30 +03:00
sergystepanov
2273fe393f Add IceRestart stub 2026-06-04 22:36:30 +03:00
sergystepanov
65d74bb769 Move MediaStream element to WebRTC start options 2026-06-04 22:36:30 +03:00
sergystepanov
b7bd198a8e Reformat app.js 2026-06-04 22:36:30 +03:00
sergystepanov
6a03b65e42 Update webrtc.js 2026-06-04 22:36:30 +03:00
sergystepanov
edb92b8993 Change predefined datachannels to callbacks 2026-06-04 22:36:30 +03:00
sergystepanov
de24654ca8 Use direct FlushCandidates instead of global messaging 2026-06-04 22:36:30 +03:00
sergystepanov
dae0b62eb0 Clean webrtc module 2026-06-04 22:36:30 +03:00
sergystepanov
00b52dde8d Reformat webrtc.js 2026-06-04 22:36:29 +03:00