Two details make this hard to get right by hand, and both are why headless
integrations lose the host's video:
oldAllStreams matters. During normal conference layout processing the
SDK moves a stream out of allVideoStreams into oldAllStreams. Reading
only allVideoStreams makes the host disappear mid-call.
The self marker must go.allVideoStreams is seeded with a
producerId: 'youyou' placeholder for the local user.
Entries are de-duplicated by producerId, falling back to the stream id, so a
stream present in both collections is returned once.
Every remote camera in the room, in render order.
Two details make this hard to get right by hand, and both are why headless integrations lose the host's video:
oldAllStreamsmatters. During normal conference layout processing the SDK moves a stream out ofallVideoStreamsintooldAllStreams. Reading onlyallVideoStreamsmakes the host disappear mid-call.allVideoStreamsis seeded with aproducerId: 'youyou'placeholder for the local user.Entries are de-duplicated by
producerId, falling back to the stream id, so a stream present in both collections is returned once.