Closed pradeep538 closed 4 years ago
Sorry for trobling, as i have changed the getAudioTracks() to await room.activeSpeaker.addSpeaker( client.incomingStream && client.incomingStream.getAudioTracks()[0] );
It worked perfectly Hence it is working fine am closing this issue. Thank You.
hi @murillo128 i have added below code to detect voice activity
`var room = {} room.activeSpeaker = MediaServer.createActiveSpeakerDetector(); //adding each client incoming track try{ await room.activeSpeaker.addSpeaker( client.incomingStream && client.incomingStream.getAudioTracks() );
room.activeSpeaker.on("activespeakerchanged", (track) => { console.log("VOICE_ACTIVITY_CHANGED", track); }); `
am getting below error VOD_ERROR: TypeError: Cannot read property 'values' of undefined at ActiveSpeakerDetector.addSpeaker (/home/pradi/node_modules/medooze-media-server/lib/ActiveSpeakerDetector.js:99:34) at /home/pradi/dist/lib/conferenceHandler.js:76:46 at Generator.next ()
at /home/pradidist/lib/conferenceHandler.js:8:71
at new Promise ()
at __awaiter (/home/pradi/dist/lib/conferenceHandler.js:4:12)
at Object.exports.createTransportObject (/home/pradi/dist/lib/conferenceHandler.js:43:56)
at /home/pradi/dist/lib/conferenceHandler.js:41:26
at Generator.next ()
at /home/pradi/dist/lib/conferenceHandler.js:8:71