handle combined participant update. (#130)

* handle combined participant update (WIP).

* always emit events for new publications.

* update info for exist participant.

* fix tests.

* update.

* Move emitWhenConnected to Room layer.
This commit is contained in:
CloudWebRTC
2022-07-04 11:11:56 +08:00
committed by GitHub
parent 8f877e98ec
commit bcfea1e625
5 changed files with 65 additions and 18 deletions
+9 -3
View File
@@ -36,10 +36,16 @@ void main() {
test('participant join', () async {
expect(
room.events.streamCtrl.stream,
emits(predicate<ParticipantConnectedEvent>(
(event) => event.participant.sid == remoteParticipantData.sid,
)),
emitsInOrder(<Matcher>[
predicate<TrackPublishedEvent>(
(event) => event.participant.sid == remoteParticipantData.sid,
),
predicate<ParticipantConnectedEvent>(
(event) => event.participant.sid == remoteParticipantData.sid,
)
]),
);
ws.onData(participantJoinResponse.writeToBuffer());
await room.events.waitFor<ParticipantConnectedEvent>(