participantId to streamId

pull/3/head
Alex 2017-04-12 21:56:21 +02:00 committed by GitHub
parent a68652cdd4
commit 0ae2b3b0f1
1 changed files with 5 additions and 5 deletions

View File

@ -462,7 +462,7 @@ export class Stream {
}); });
console.log(this.getId() + ": set peer connection with recvd SDP answer", console.log(this.getId() + ": set peer connection with recvd SDP answer",
sdpAnswer); sdpAnswer);
let participantId = this.getId(); let streamId = this.getId();
let pc = this.wp.peerConnection; let pc = this.wp.peerConnection;
pc.setRemoteDescription(answer, () => { pc.setRemoteDescription(answer, () => {
// Avoids to subscribe to your own stream remotely // Avoids to subscribe to your own stream remotely
@ -478,16 +478,16 @@ export class Stream {
this.speechEvent = kurentoUtils.WebRtcPeer.hark(this.wrStream, { threshold: this.room.thresholdSpeaker }); this.speechEvent = kurentoUtils.WebRtcPeer.hark(this.wrStream, { threshold: this.room.thresholdSpeaker });
this.speechEvent.on('speaking', () => { this.speechEvent.on('speaking', () => {
this.room.addParticipantSpeaking(participantId); this.room.addParticipantSpeaking(streamId);
this.room.emitEvent('stream-speaking', [{ this.room.emitEvent('stream-speaking', [{
participantId: participantId streamId: streamId
}]); }]);
}); });
this.speechEvent.on('stopped_speaking', () => { this.speechEvent.on('stopped_speaking', () => {
this.room.removeParticipantSpeaking(participantId); this.room.removeParticipantSpeaking(streamId);
this.room.emitEvent('stream-stopped-speaking', [{ this.room.emitEvent('stream-stopped-speaking', [{
participantId: participantId streamId: streamId
}]); }]);
}); });
} }