HomePhabricator

Add workaround for race condition

Description

Add workaround for race condition

At the moment we rely on the 'webrtcup' Janus event for our 'established'
event. Turns out, this can be problematic, because on outgoing calls that can
come before the setRemoteDescription callback kicks in, which is where we
post the 'accepted' event. As a result, we get the state changes in the
incorrect order.

This is just a stopgap, a cleaner fix is needed.

Details

Auditors
tijmen
Provenance
saghulAuthored on Oct 12 2016, 7:47 AM
Parents
rSYLKRTCe485d0a0eaa2: Add ability to invite participants to a conference
Branches
Unknown
Tags
Unknown

Event Timeline

tijmen raised a concern with this commit.EditedOct 17 2016, 2:46 PM
tijmen added a subscriber: tijmen.

This thing breaks outgoing calls. I get the event established, but inside current call the state is still accepted:

blinkrtc:App Call state changed! accepted -> established +11ms
Call.js:123 accepted
browser.js:112 sylkrtc:Call Stream added +9ms

Call.js:123 is where I print currentCall.state

This means we never transition from localMedia to VideoBox

You are right. Pushed a new fixup commit, please test it out.