Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Unable to connect streams between two devices with relay-only mode forced #1029

Open
BigETI opened this issue Apr 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@BigETI
Copy link

BigETI commented Apr 19, 2024

Package version

3.0.0-pre.7

Environment

* OS: Tested on latest versions of *iOS*, macOS, and Windows
* Unity version: 2023.2.0f1

Steps To Reproduce

Set RTCConfiguration.iceTransportPolicy, to RTCIceTransportPolicy.Relay during RTCPeerConnection instantiation.

Current Behavior

Audio, data, and video streaming does not always work across different networks.

Expected Behavior

Audio, data, and video streaming works across different networks.

Anything else?

I am unable to connect audio, nor video streams, with relay-only mode forced.

The reason why I have forced relay mode is, because in many scenarios, peer-to-peer communication is not possible, therefore needs to be able to stream audio, video, and data through relay, (TURNS) as well as peer-to-peer. (STUN/TURN)

The initial issue with audio, video, and data streaming was, that for example on different networks, streaming would not always work, and on mobile, even less.

For testing purposes, I was able to isolate the issue with streaming, by forcing streaming to relay mode. (RTCConfiguration.iceTransportPolicy is set to RTCIceTransportPolicy.Relay)
That made even local network streaming impossible. (Peer-to-peer)

I want to ensure, that the Unity WebRTC implementation works through different networks.
To test, if the issue was with AWS, we have tested signaling, and RTC through example native iOS apps, which worked flawlessly.

The idea of TURN/TURNS is, to solve the issue with, whenever peer-to-peer is not possible, by relaying streams.

ICE servers, with correct authentication are specified, and awaited till negotiation is needed, in order to create an offer, and connect to a signaling server. (Session descriptions are empty, if offers are created outside RTCPeerConnection.OnNegotiationNeeded, after it being invoked. This is a different issue for sure)
Session descriptions, and ICE candidates are correct, and successfully exchanged through a signaling server, provided by AWS.
From observation, for example the received video stream is reported to be empty, if connection is relayed.

@BigETI BigETI added the bug Something isn't working label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants