
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
This is a WebRTC client library/abstraction layer. It is inspired by palava-client and attempts to offer users and developers a better experience.
The design goals and principles are
The central element of the library is a Room. Multiple users, which are called
Peer, can join a room and will create peer to peer connections to each other.
You can send audio/video data to the peers through this connection, this is
represented by a Stream, or send custom data using a DataChannel.
All streams added to the local peer using addStream() will be sent to all
peers which are in the room. If you want to send a stream only to specific peers
you can add them later using addStream() on the remote peer as soon as they
are encountered. The same applies to data channels.
Here is a simple example:
// create a room
var room = new rtc.Room("wss://rtc.innovailable.eu/testroom");
// create a local stream from the users camera
var stream = room.local.addStream();
// display that stream
var ve = new rtc.MediaDomElement($('video'), stream);
// get notified whenever we meet a new peer
room.on('peer_joined', function(peer) {
// create a video tag for the peer
var view = $('<video>');
$('body').append(view);
var ve = new rtc.MediaDomElement(view, peer);
// remove the tag after peer left
peer.on('left', function() {
view.remove();
});
});
// join the room
room.connect();
This can be considered a minimal example implementing a multi user video chat. For your own implementation you might want to have more control over the workflow and handle errors.
For a more complex example have a look at the example folder. You can run this
code using make example which will create a server which includes everything
you need. Feel free to play around with this test code to get to know the API.
The complete API documentation is embedded as
YUIDoc in the source code. You can create an
HTML page from it using make doc or view it online
here.
You will need a signaling server to enable the peers to find each other and establish the peer to peer connections. rtc-lib supports multiple different signaling protocols including calling-signaling and the palava protocol (implemented by signal tower and others). You could also write your own signaling server or implement another signaling protocol.
It is also recommended to use a STUN server which will allow peers to connect through routers and firewalls. If you do not use one only clients on the same network would be able to connect to each other. There are several STUN servers open for public use or you can set up your own STUN server using one of multiple open source projects.
A TURN server can be added to allow connections in nearly all scenarios.
FAQs
An experimental promise based WebRTC library
We found that rtc-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.