Closed
Description
Describe the bug
Using onTrack
of PeerConnection
results in a Not found video track for RTCMediaStream: {streamId}
error in the console and videos not being rendered in UI.
To Reproduce
peerConnection.onTrack = (event) async {
final stream = event.streams.first;
final track = event.track;
if (track.kind == 'video') {
final remoteRenderer = RTCVideoRenderer();
await remoteRenderer.initialize();
remoteRenderer.srcObject = stream;
_remoteRenderers.putIfAbsent(stream.id, () => remoteRenderer);
}
};
Expected behavior
The error should not be thrown as there are video tracks and they should renderer normally.
Metadata
Metadata
Assignees
Labels
No labels