awslabs / amazon-kinesis-video-streams-webrtc-sdk-js

JS SDK for interfacing with the Amazon Kinesis Video Streams Signaling Service.
https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-js/examples/index.html
Apache License 2.0
287 stars 141 forks source link

onTrack Event not received even after state changed connected started #146

Closed rbaid1221 closed 3 years ago

rbaid1221 commented 3 years ago

This is my scenario:

I'm testing the master directly from the AWS Kinesis Signalling Channels Page with the 'Webcam Demo'.

One thing I thought of was to simply set a timer in between connected and on track. If detected as connected, but on the track event is not received for 5-10 seconds, restart the process. Does anyone have any tips of how to restart the process? Do I simply .stop() peer connection, set it to null, and reinitialize everything? I tried peerConnection.restartIce() already but that did not seem to do anything.

disa6302 commented 3 years ago

The master must be started before viewer for successful SDP exchange. If the master starts late, the viewer would not get any answer back in which case, the initial connection will not be established.

hassanctech commented 3 years ago

@rbaid1221 please let us know if you still have some unresolved issues. I'm closing this issue as @disa6302 has provided guidance to resolve your issue and we have not heard back in 9 days so I assume it is resolved.