Meeting Conference With Ant Media

Posted By : Rajesh Kumar | 19-Mar-2024

WebRTC OTT

Loading...

In this blog post, we shall discuss different types of video conferencing solutions in Ant Media Server.

Stream-Based SFU Video Conference

This is the first implemented solution in AMS. It works with WebRTC streams directly.

  1. When a participant joins a room, they will send a join request to AMS for the room.
  2. AMS responds with the stream ID(stream_id) for the participant and the list of the other participant's stream IDs(stream_id) in the room.
  3. He/She will start to publish a WebRTC stream with his stream ID(stream_id).
  4. He/She sends WebRTC play requests for each stream ID he gets one by one.
  5. The information for the newly joined/left participants he/she should get room info (which contains the stream IDs of the room) periodically and compare the returning current stream IDs with the previous list he has.
  6. He/She sends play requests for new stream IDs, and stops requests for removed IDs.
  7. The calling leave method in Ant Media is enough to leave the room. (no need to send a stop request for each ID).
  8. Stream-based SFU Video Conference solution works in the clustered mode. Publish and all play request sent by a participant is forwarded to the same node in the cluster. So, there is no need to make the origin-edge distinction in such type of a cluster.

Also, Read Delegation Pattern and The By Keyword

Track-Based SFU Video Conference

This is a recent conference solution in AMS. It works with WebRTC tracks instead of streams. Users can find more about multitrack streaming in this blog post.

  1. When a participant joins a room, he/she sends a join request to AMS for the room.
  2. AMS responds with the stream ID(stream_id) for the participant.
  3. He/She starts to publish a WebRTC stream with his stream ID(stream_id).
  4. He/She sends only one WebRTC play request for the room ID.
  5. AMS sends the notification in the app for the newly joined/left participants. (Used for UI).
  6. The calling leave method is enough to leave the room and leave the meeting.

Also, Read How To Improve Angular Application Performance

MCU Video Conference

In an MCU Video conference, the user will get only 1 output stream for 1 room. This stream contains the merged video and mixed audio. The drawback of this type of conference is that users will hear your own audio in the mixed audio. So MCU is used in addition to other types of video conference solutions to get a single stream to record or share the video/ audio players(not participants) for the room.
Users can enable this Video Conference by sending a join request withthe mode="mcu"parameter. Users can also checkthe conference.htmlsample page for JS SDK. To stop hearing of their own audio, users can customize this page by playing the merged video but not a mixed audio. Instead of mixed audio, you can play audio streams for each participant individually.