Streaming WebRTC in unity #5946
-
Hi, I've been following this tutorial : https://antmedia.io/webrtc-streaming-in-unity/ in order to try and receive a WebRTC stream into unity. I've downloaded the https://github.com/ant-media/WebRTC-Unity-SDK WebRTC unity SDK. I created a Ant Server on Linode and broadcast into it using OBS. The unity sample does not look like the one in the tutorial/ I opened the AMSStreaming scene In Unity, and modified the url in the AMSStreaming script to point to my server : "ws://my_server_ip:5080/WebRTCApp/websocket" and provided the WebRTCClient with the correct stream id and url. I left the stun server to the default stun server address : stun:stun.l.google.com:19302 Running the sample, I set the comboBox to "Play" and click "Start". The connection works fine and
gets executed. However nothing else happens, no RTCTrackEvent are received. I have also placed a breakpoint in the CreatePeerConnection() Method :
That never gets hit, so the ICEConnectionChange never changes. Could that be the problem ? How can I move forward debugging this ? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@mariia-artamonova I hope it helps. |
Beta Was this translation helpful? Give feedback.
@mariia-artamonova
The blog post you mentioned is an old one for the Unity SDK. Please see the blog post below for more information on the new Unity SDK implementation.
https://antmedia.io/how-to-use-the-new-ant-media-server-unity-sdk/
I hope it helps.