When joining a room there will be a brief period before the Subscriber
API data channel is established. Methods that use the API during that
time will fail silently. This can be a source of race conditions for
code that needs to set the initial state of streams immediately after
joining.
This change adds an onapiready handler that will be called once the
data channel is established, which provides a way to avoid such race
conditions.
When joining a room there will be a brief period before the Subscriber API data channel is established. Methods that use the API during that time will fail silently. This can be a source of race conditions for code that needs to set the initial state of streams immediately after joining.
This change adds an
onapiready
handler that will be called once the data channel is established, which provides a way to avoid such race conditions.