Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{ "id": "ccm", "params": ["fir"]},
{ "id": "nack"},
{ "id": "nack", "params": ["pli"]},
],
extensions : [ "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01", "urn:3gpp:video-orientation"]
}
};
//No participants
this.max = 0;
//Create event emitter
this.emitter = new EventEmitter();
//Active speaker detection
this.activeSpeakerDetector = MediaServer.createActiveSpeakerDetector();
//When new speaker detected
this.activeSpeakerDetector.on("activespeakerchanged",(track)=>{
//Get active speaker id
const speakerId = track.participant.getId();
//Check if it is the same as current one
if (this.speakerId===speakerId)
//Do nothing
return;
//Update speaker
this.speakerId = speakerId;
//Relaunch event
this.emitter.emit("activespeakerchanged",track.participant,track);
});
//Create uri
this.uri = ["rooms",id];