Avatar

Level 2
Is there a way to know if the host has arrived without
authenticating to a room?



I noticed that the room state is always hostHasNotArrived to
a non-authenticated guest and when a listener for ROOM_STATE_CHANGE
is attached to the sessions roomManager instance you do not receive
events until you enter the room as either a guest or an
authenticated user. Furthermore you receive two ROOM_STATE_CHANGE
events as soon as you enter the room, the first being a
hostHasNotArrived ( regardless of the actual host status ) and then
a second immediate ROOM_STATE_CHANGE event stating the correct
state of the room ( whatever it really is ).



The use case I am trying to solve for is in an application
designed to only be used by a guest user you would like to know the
presence of a host in a room. Otherwise you could enter a room as a
guest and wait forever. More importantly in the current
implementation if I attempt to log in as a guest and receive the
hostHasNotArrived status I would assume that there was no host when
in fact there is. Currently I have to ignore the hostHasNotArrived
and wait around for the second event.