Skip to content

Commit

Permalink
Port bugfix from SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
juberti committed Dec 29, 2023
1 parent 50a28d4 commit daee882
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/voice/src/app/agent/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -659,11 +659,11 @@ export class WebRtcChatManager implements ChatManager {
switch (msg.type) {
case 'room_info':
this.room = new Room();
this.room.on(RoomEvent.TrackSubscribed, (track) => this.handleTrackSubscribed(track));
this.room.on(RoomEvent.DataReceived, (payload, participant) => this.handleDataReceived(payload, participant));
await this.room.connect(msg.roomUrl, msg.token);
console.log('[chat] connected to room', this.room.name);
this.maybePublishLocalAudio();
this.room.on(RoomEvent.TrackSubscribed, (track) => this.handleTrackSubscribed(track));
this.room.on(RoomEvent.DataReceived, (payload, participant) => this.handleDataReceived(payload, participant));
break;
default:
console.warn('unknown message type', msg.type);
Expand Down

0 comments on commit daee882

Please sign in to comment.