room.localParticipant.tracks.forEach(publication => {
publication.track.stop();
const attachedElements = publication.track.detach();
console.log("unsubscribed from: " + publication.track)
attachedElements.forEach(element => element.remove());
});