Track is null on RemoteTrackPublication

Viewed 183

I have setup an event handler for the trackPublished event so that I can update the video element with the remote users video stream when its published after the local user is already connected.

    participant.on('trackPublished', publication => {
        trackSubscribed(remoteMediaDiv, publication.track);
    });

The issue is the track is always null. Its also not subscribed, I think that might be related but don't have a great grasp of the publish/subscribe states.

The local user loads the remote streams with the trackSubscribed without any issue when the remote user connects to the room before the local user.

Any ideas?

0 Answers
Related