Can you subscribe to a WebRTC stream with both mediaConstraints, audio and video, set as false?
Can you subscribe to a WebRTC stream with both mediaConstraints, audio and video, set as false?
Can you subscribe to a WebRTC stream with both mediaConstraints, audio and video, set as false? When one subscribes to a stream with both set as false, and later an attempt is made to unmute the subscribed user, then it gives error that the audio stream is undefined. It kind of makes sense that if neither audio nor video is subscribed then what is getting subscribed. But a validation from a WebRTC/Kurento expert will help.
let participant = participants[senderid];
var options = {
remoteVideo: videoElement,
mediaConstraints: {audio:false,video:false},
participantid: senderid,
onicecandidate:participant.onIceCandidate.bind(participant)
};
participant.rtcPeer = new kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function (error) {
if (error) {
return console.error(error);
}
this.generateOffer(participant.offerToReceiveVideo.bind(participant));
});
this.socket.on('userStatusChanged',(senderid)=>{
let participant = participants[senderid];
// Here I want to enable the audio for this sender.
})
// Note: - I tried the below case. But getting undefined in remoteStream.
// let remoteStream = participant.rtcPeer.peerConnection.getRemoteStreams()[0];
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Comments
Post a Comment