pion / example-webrtc-applications

Examples of WebRTC applications that are large, or use 3rd party libraries
https://pion.ly/
MIT License
1.03k stars 243 forks source link

sfu-ws Deployment Failure on Web (Successful in Local Environment) #162

Closed ponyo877 closed 7 months ago

ponyo877 commented 7 months ago

Your environment.

What did you do?

I create a video and audio communication service using the WebRTC package, Pion, in Go. I made some modifications to sfu-ws in pion/example-webrtc-applications and deployed it on the web. https://sub.folks-chat.com/ (fail)

What did you expect?

Please let me know what can be improved.

What happened?

when I made some modifications to sfu-ws in pion/example-webrtc-applications and deployed it on the web, the ICE connection state always transitions from 'new' to 'checking' and then to 'disconnected', and I am unable to establish a video call. (In my local environment, I was able to successfully make a video call.) Please let me know what can be improved.

Here are the modifications I made:

The above configuration is published at https://sub.folks-chat.com/ (as mentioned above, WebRTC is not implemented).

Here are the codes I used:

Everything is made by forking pion/example-webrtc-applications. The changes can be easily understood by looking at the following two commits:

Sean-Der commented 7 months ago

Hey @ponyo877!

Thanks for using Pion. I responded to your question on Stackoverflow here

Happy to help here, stackoverflow or on Slack

ponyo877 commented 7 months ago

Thanks you, Your point was right on the money!

It was due to the fact that I was using a container, which resolved. I solved it by adding network_mode: host to the container.

commit 36a4708