To install Kurento Media Server: Installation Guide.
New generateOffer(offerToReceiveAudio, offerToReceiveVideo)¶
Albeit the way applications are typically written have the SDP Offer/Answer being started from the client (i.e. a client browser sends an SDP Offer to KMS), it has always been possible to do the opposite, and start the WebRTC negotiation from KMS, with the client method
generateOffer() (i.e. KMS generates an SDP Offer that is sent to the client browser).
However, SDP Offers generated by KMS would always contain one audio and one video media-level sections (those lines starting with
m= in the SDP). This would make it impossible to send an audio-only or video-only offer to the clients.
offerToReceiveVideo options that are well known from the `RTCPeerConnection.createOffer() <https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createOffer`__ method. These options can be used to change the SDP Offer generation in KMS, so it is now possible to control whether the offer inclused audio or video, separately.
Example Java code, for an audio-only offer:
import org.kurento.client.OfferOptions; [...] OfferOptions options = new OfferOptions(); options.setOfferToReceiveAudio(true); options.setOfferToReceiveVideo(false); String sdpOffer = webRtcEp.generateOffer(options);
New WebRTC settings: externalIPv4, externalIPv6¶
The externalAddress parameter, introduced in Kurento 6.13.0, offered a way to tell the media server about its own public IP, without the need to use an additional STUN server. This is a nice feature because then the WebRTC connectivity checks could save some time trying to find out about the public IP in the first place. However, externalAddress would replace all of IPv4 and IPv6 addresses in the ICE candidate gathering phase, which is problematic because the actual type of address wasn’t being taken into account for the substitution.
These parameters supersede the externalAddress, which now is deprecated and scheduled for removal in the next major release of Kurento.
- externalAddress should be replaced by externalIPv4 and/or externalIPv6.
- Backported all commits from GStreamer Merge Request 38 (https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/38), which fixes a memory leak related to incorrect handling of RTCP packets, as described in issue 522 (https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/522).
Fixed libnice DDoS¶
Some users reported a worrying bug that could end up used to force DDoS attacks to machines running Kurento Media Server. The summary of it is that simply sending any bit of data to one of the TCP-Passive ports where the WebRTC engine was listening for connections, would cause a thread to spin-lock and use 100% of a CPU core.
The issue was studied and located to be in libnice, a 3rd-party library that Kurento uses to implement the ICE protocol which is part of WebRTC. libnice developers had a great reaction time and this issue got fixed in a matter of days!
Kurento now brings the newest version of this library, meaning that our favorite media server is now safer and more robust.
Full description, with images, code samples, external links, etc.
Some useful syntax examples:
There were other changes and fixes contributed by users, who merit our sincere appreciation and thanks for sharing their work with the Kurento project:
- @prlanzarin (Paulo Lanzarin) for Kurento/kms-elements#23 (Fix STUN server usage when stunServerPort isn’t set and the default value is to be used).
- @t-mullen (Thomas Mullen) for Kurento/kms-elements#24 (Fix incorrect cropping in AlphaBlending element).
- @marcosdourado (Marcos Dourado) for Kurento/kurento-client-js#10 (remove lib error-tojson and add method locally to stringify error).
- @tuttieee (Yuichiro Tsuchiya) for Kurento/kurento-client-js#11 (Fix register() calls inside lib/index.js).
- @tuttieee (Yuichiro Tsuchiya) for Kurento/kurento-tutorial-js#9 (Use IceCandidateFound event instead of deprecated OnIceCandidate event).