AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
7.07k stars 505 forks source link

Source `webrtc:ws://` does not work anymore with v1.9.5+ #1425

Closed seydx closed 1 week ago

seydx commented 3 weeks ago

Connecting to a webrtc:ws:// source with go2rtc does not work anymore.

Go2RTC Error: SetRemoteDescription called with no ice-ufrag

No issues with v1.9.4

The problem is that the String() function was changed: https://github.com/AlexxIT/go2rtc/commit/16e48314990d851368e57ffbe7b1afe5b01b5b15#diff-02fb0f2a331db3c6230c089797204d5d3a1bf6a460f59b7213789e8c8f44b92eR43

And reading the answer now only returns an empty string instead of the value: https://github.com/AlexxIT/go2rtc/blob/8cca8decdefdb839040ca83143f8286ae3743ecb/internal/webrtc/client.go#L145

A quick fix would be:

answer := msg.Value.(string)

Or as discussed on Telegram, change the Message to a Request/Response struct

AlexxIT commented 3 weeks ago

Fixed in master. Thanks for pointing exact place of problem!

Feneck91 commented 3 weeks ago

Waiting 1.9.7 version, 1.9.6 (and 1.9.5) does not work for me into Home Assistant. Thanks to @seydx.

AlexxIT commented 1 week ago

https://github.com/AlexxIT/go2rtc/releases/tag/v1.9.7