mirror of https://github.com/OpenVidu/openvidu.git
Merge 0ae2b3b0f1
into 76a7531a69
commit
81c824239d
|
@ -509,7 +509,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
|
||||||
|
@ -525,16 +525,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
|
||||||
}]);
|
}]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue