Closed fenestron closed 3 years ago
I found the solution in the rtp-forwarder example from the pion/webrtc repository https://github.com/pion/webrtc/blob/545613dcdeb5dedb01cce94175f40bcbe045df2e/examples/rtp-forwarder/main.go#L152
For this particular example, third party applications usually timeout after a short amount of time during which the user doesn't have enough time to provide the answer to the browser. That's why, for this particular example, the user first needs to provide the answer to the browser then open the third party application. Therefore we must not kill the forward on "connection refused" errors
To prevent this error, add these lines:
if opError, ok := err.(*net.OpError); ok && opError.Err.Error() == "write: connection refused" {
continue
}
Your environment.
bb523ff12fc436d47f0c99180bac6e9ae401ea15
What did you do?
Launched
pubsubtest
fromion-sfu
:Opened a link in a browser: http://localhost:8000/ And pressed the
start
buttonRun the
track-to-rtp
example:What did you expect?
Video and audio tracks are forwarded to local UDP ports 4000 and 4002
What happened?
I get an error:
Full log: full-log.txt