You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have both server and client running in unity.
The server creates a Video Stream like this:
_peerConnection = new RTCPeerConnection(ref config);
_peerConnection.OnIceCandidate += OnIceCandidate;
_peerConnection.OnIceConnectionChange += OnIceConnectionChange;
_peerConnection.OnConnectionStateChange += OnConnectionStateChange;
_localVideoTrack = _mainCamera.CaptureStreamTrack(1280,720);
var sendStream = new MediaStream();
_peerConnection.AddTrack(_localVideoTrack, sendStream);
The client tries to read the video stream. But only the ontrack is called only once.
var config = GetRTCConfiguration();
_peerConnection = new RTCPeerConnection(ref config);
_peerConnection.OnIceCandidate += OnIceCandidate;
_peerConnection.OnConnectionStateChange += OnConnectionStateChange;
//_peerConnection.OnTrack += OnTrack;
_peerConnection.OnTrack = e =>
{
if (e.Track is VideoStreamTrack track)
{
track.OnVideoReceived += tex =>
{
Debug.Log("Video Received");
_receiveImage.texture = tex;
};
}
};
"Video Received" Log is printed just once. I was expecting it to print every frame. Can someone direct me the problem?
Current Behavior
No response
Expected Behavior
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Package version
3.0.0-pre.7
Environment
Steps To Reproduce
I have both server and client running in unity.
The server creates a Video Stream like this:
The client tries to read the video stream. But only the ontrack is called only once.
var config = GetRTCConfiguration();
_peerConnection = new RTCPeerConnection(ref config);
_peerConnection.OnIceCandidate += OnIceCandidate;
_peerConnection.OnConnectionStateChange += OnConnectionStateChange;
//_peerConnection.OnTrack += OnTrack;
"Video Received" Log is printed just once. I was expecting it to print every frame. Can someone direct me the problem?
Current Behavior
No response
Expected Behavior
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: