Skip to main content


When the composition is enabled, the composed media stream is received by this event.

This event is emitted when a user joins a meeting room with composition enabled.

meeting.on("composedTrackStarted", function(remoteTrackItem) {



remoteTrackItem is an object that contains the following properties:

streamIduniqueId of the video or audio stream
typetype can be video or audio
participantSessionIdparticipantSessionId of the source Participant
trackMediaStreamTrack . This should be converted into MediaStream object before attaching to html video tag. see example below.
namename of the source user


<div id="remoteVideoContainer">
meeting.on("composedTrackStarted", function(remoteTrackItem) {
console.log("composedTrackStarted", remoteTrackItem);
// Converting MediaStreamTrack to MediaStream
var track = remoteTrackItem.track;
var stream = new MediaStream([track]);

// Creating a videoTag to show the remote stream
const videoTag = document.createElement("video");
videoTag.autoplay = true;
videoTag.srcObject = stream;
videoTag.playsinline = true;
// We are setting the id of the videoTag to the streamId
// So that when this track is stopped we can remove the
// videoTag from the page. = remoteTrackItem.streamId;
// Setting the class name to participantSessionId so that when this participant
// leaves we can easily remove all the video tags associated with this
// participant.
videoTag.class = remoteTrackItem.participantSessionId;

// Adding the video tag to container where we will display
// All the remote streams