client-sdk-js
client-sdk-js copied to clipboard
Calling start() on a remote track multiple times creates multiple looping monitors
When calling start() on RemoteTrack it calls this.monitorReceiver() which then calls itself with:
setTimeout(() => {
this.monitorReceiver();
}, monitorFrequency);
This means that if you call start again on a remote track it will create a new setTimout loop. This can lead to a case where there are many redundant monitorReceiver calls on the same RemoteTrack if you call start on a track multiple times