I am using AWS Kinesis, and everything is working well for 1 on 1. I have 1 Master, 1 Viewer and both can see the other without issue.
If a 3rd person joins as a viewer, the master can see the new viewer, but the initial viewer cannot. I am not sure how to achieve this as I can only have 1 master per signaling channel, and they are the only ones who can communicate with multiple viewers. I need the viewers to be able to talk to each other too.
I tried creating a master and viewer for each individual (Concept was they if everytime a viewer joined the master would see the video stream), but due to 1 master per channel on the 1 of the masters was notified to add the new stream.
peerConnection.addEventListener("track", async event => {
if (
!master.remoteStreams.includes(
event.streams[event.streams.length - 1]
)
) {
const remoteView = await parentThis.createVideo();
master.remoteStreams.push(
event.streams[event.streams.length - 1]
);
remoteView.srcObject = event.streams[event.streams.length - 1];
}
});`