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
Quote
else if(mode == MODE_PLAY) {
webRTClient.Play();
gets executed.
However nothing else happens, no RTCTrackEvent are received.
I have also placed a breakpoint in the CreatePeerConnection() Method :
Quote
localPC.OnIceConnectionChange = state => {
switch (state)
{
case RTCIceConnectionState.Connected:
//PeerConnected();
//break;
case RTCIceConnectionState.New:
case RTCIceConnectionState.Checking:
case RTCIceConnectionState.Closed:
case RTCIceConnectionState.Completed:
case RTCIceConnectionState.Disconnected:
case RTCIceConnectionState.Failed:
case RTCIceConnectionState.Max:
Debug.Log("IceConnectionState: "+state);
break;
default:
throw new ArgumentOutOfRangeException(nameof(state), state, null);
};
};
That never gets hit, so the ICEConnectionChange never changes.
Question
Regis
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
Link to comment
Share on other sites
Top Posters For This Question
3
2
Popular Days
Jan 26
2
Jan 19
1
Jan 20
1
Jan 24
1
Top Posters For This Question
Regis 3 posts
Burak 2 posts
Popular Days
Jan 26 2023
2 posts
Jan 19 2023
1 post
Jan 20 2023
1 post
Jan 24 2023
1 post
Popular Posts
Burak
Thank you @Regis. Lets schedule a meeting together next week. I will tell the WebRTC part and general structure for the SDK. You can tell me the Unity thing. Then we can continue to improve it togethe
4 answers to this question
Recommended Posts