Skip to content

Commit bae8be5

Browse files
committed
feat: add /shot broadcastProduced broadcast event
1 parent c4ee2fc commit bae8be5

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/server/modules/socket-io/socket-io.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,10 @@ export default class SocketIOServer {
719719
}
720720
}
721721

722+
this.shotNsp
723+
.to(this.getViewerLogicRoomKey(uca))
724+
.emit('broadcastProduced', { shotId: id, trackId: data.trackId });
725+
722726
return {
723727
producerId: producer.id,
724728
type: producer.type,
@@ -896,7 +900,9 @@ export default class SocketIOServer {
896900
mediaRoom.shots.get(data.shotId)?.trackProducers?.delete(trackId);
897901
}
898902
});
899-
this.shotNsp.to(this.getViewerLogicRoomKey(uca)).emit('broadcastStopped', { shotId: data.shotId, trackIds: data.trackIds });
903+
this.shotNsp
904+
.to(this.getViewerLogicRoomKey(uca))
905+
.emit('broadcastStopped', { shotId: data.shotId, trackIds: data.trackIds });
900906
},
901907
);
902908
});

0 commit comments

Comments
 (0)