twilio / twilio-video.js

Twilio’s Programmable Video JavaScript SDK
https://www.twilio.com/docs/video/javascript
Other
571 stars 217 forks source link

trackAdded gets triggered inconsistently during a conversation #18

Closed vicrep closed 7 years ago

vicrep commented 8 years ago

This issue might be related to your SIP/TURN server, but I'm posting here in case it isn't.

I've been setting up a webrtc based video-chat for a project (with all clients using twilio-conversations.js), but have been running into some stability issues.

When switching tracks on a device (i.e. switching cameras on a mobile device), the other participant of the conversation only receives the trackAdded event roughly 80% of the time, with the other 20% just not receiving anything (but the previous track being disabled, since your javascript sdk only supports one track at the time).

In case this is SIP related and I end up being stuck with this problem, is there a way for me to be able to re-poll the other participant for updated tracks?

I've also noticed that this becomes more unreliable if I switch tracks faster (>1/sec), so I feel like this could be due to how you receive async events on your server (eg could they be getting flattened without consideration for the order they were sent in?).

markandrus commented 7 years ago

Hi @vicrep,

Sorry you hit this issue. We've made a lot of changes since the project was called twilio-conversations.js with a lot of improvements around Track and Participant signaling. We've also worked to isolate this signaling from our usage of SIP so that we can completely rip that portion out in a future release. Would you mind retesting with twilio-video.js and re-opening this issue (or a new one) if you continue to encounter the issue?

Thank you, Mark