I want to have only audio stream communication between peers , I changed the parts of kurento.utils.js to get only audio stream via getusermedia
but it's not working
I used this example node-hello-world example
WebRtcPeer.prototype.userMediaConstraints = {
audio : true,
video : {
mandatory : {
maxWidth : 640,
maxFrameRate : 15,
minFrameRate : 15
}
}
};
to
WebRtcPeer.prototype.userMediaConstraints = {
audio : true,
video : false
};
is it possible use kurento service for only audio stream?
This is indeed possible with Kurento. There are two ways of doing this, depending on the desired scope of the modification:
processOffer
method call, you can tamper the SDP to remove all video parts. That way, your client will send back only audio./etc/kurento/sdp_pattern.txt
file removing all video related parts, this will force SdpEndpoints (parent class of WebrtcEndpoint) to only use audio.EDIT 1
The file
sdp_pattern.txt
is deprecated in KMS 6.1.0, so method 2 shouldn't be used.EDIT 2
There was an issue with the kurento-utils library, and the client was not correctly setting the
OfferToReceiveAudio
. It was fixed some time ago, and you shouldn't need tampering the SDPs now.git origin: https://github.com/Kurento/kurento-tutorial-js.git git branch: 6.6.0
My solution is only changing
var offerVideo = true;
tovar offerVideo = false;
ingenerateOffer
function of kurento-utils.js file.My approach is to modify the options that you pass to the WebRtcPeer.
Besides, in the kurento-utils.js, the mediaContraints is overidden by this line:
So comment it.