Emitted when any participant in the meeting room shares their microphone, camera, or screen

This event is emitted when any remote participant in the meeting room shares their microphone, camera, or screen.

This event is used to show the remote participant's video or audio to the current user.

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



remoteTrackItem is an object that contains the following properties:




uniqueId of the video or audio stream


type can be video or audio


participantSessionId of the source Participant


MediaStreamTrack. This should be converted into MediaStream object before attaching to html video tag. see example below.


name of the source user


<div id="remoteVideoContainer">
meeting.on("remoteTrackStarted", function(remoteTrackItem) {
    console.log("remoteTrackStarted", 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