Open TimoKettunen opened 2 weeks ago
Describe the feature
Mediamtx integrates the webrtc signaling server but it supports only HTTP. Some clients work only with web socket interface for signaling server. Mediamtx should support also web socket interface for signaling server.
it would be great
I also need it
Hello, WebSocket is a generic communication protocol like HTTP - in order to perform signaling, there must be a specification that describes how messages are formatted and what's their order.
Is anyone able to provide a document or a reference implementation that describes how to perform "signaling with WebSocket"? otherwise there are 2^N possible implementations, where N is a really big number. That's why WHIP / WHEP was standardized.
Is anyone able to provide a document or a reference implementation that describes how to perform "signaling with WebSocket"?
please explain what does the specification have to do with it? in version 0.21.0 dated December 20, 2022, there was an implementation with websockets; in version 0.21.1 dated January 9, 2023, certain changes were made thanks to which webrtc began to work great. that is, in fact it WORKED
in version 1.0.0 you changed the technology and now there is only whep for watching broadcasts, but not everyone (especially mobile platforms) can work with it normally, but everyone knows how to work with webrtc via websockets perfectly
@pikachu937 that signaling implementation worked with a non-standardized procedure that was more or less like this:
The order and the format of each step is completely arbitrary and i'm pretty sure that there were no client libraries that worked in the same way. Are you able to provide a list of libraries that support the steps and order described above?
My original motivation was to have signaling work with Unity Render Streaming. WHEP is great and it is draft standard, unfortunately not supported by Unity. When I studied more, I understood that there is no standard way to do traditional webRTC signaling with HTTP or WebSocket. Unity made it one way and provided sample signaling server that implemented it. But the Chrome web browser was able to use it. Same thing with RTSPtoWebRTC, it implemented signaling bit differently and still browser was able to connect. So even there is no standard, browser code can handle different signaling methods. This feature request could be updated to "support traditional webRTC signaling that is compatible with browsers, Unity and ...(wish list)".
@pikachu937 that signaling implementation worked with a non-standardized procedure that was more or less like this:
- a client connects through WebSocket to the server, without sending anything other than the initial WebSocket handshake
- server sends ICE servers in raw JSON
- server sends a SDP offer in raw SDP
- client replies with a SDP answer in raw SDP
- server sends any asynchronous ICE candidate in a custom JSON format
- client sends any asynchronous ICE candidate in a custom JSON format
The order and the format of each step is completely arbitrary and i'm pretty sure that there were no client libraries that worked in the same way. Are you able to provide a list of libraries that support the steps and order described above?
I can’t provide libraries, but I can check all versions of mediamtx (at that time it was still rtsp-simple-server) in which you had webrtc running via websocket with mobile platforms (ios/android) with their different possible implementations of ws/wss clients to check functionality . If necessary, I can provide logs so that you can use them to understand how the connection from them occurs.
Describe the feature
Mediamtx integrates the webrtc signaling server but it supports only HTTP. Some clients work only with web socket interface for signaling server. Mediamtx should support also web socket interface for signaling server.