Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
skyway-peerjs
Advanced tools
This branch is a customized version of PeerJS for NTT Communications's WebRTC platform SkyWay.
PeerJS provides a complete, configurable, and easy-to-use peer-to-peer API built on top of WebRTC, supporting both data channels and media streams.
This branch is a customized version of PeerJS for NTT Communications's WebRTC platform SkyWay.
Include the library
<script src="https://skyway.io/dist/0.3/peer.js"></script>
Include with NPM
npm install skyway-peerjs
Create a Peer
Get a free API key. Your id only needs to be unique to the namespace of your API key.
var peer = new Peer('pick-an-id', {key: 'myapikey'});
// You can pick your own id or omit the id if you want to get a random one from the server.
Connect
var conn = peer.connect('another-peers-id');
conn.on('open', function(){
conn.send('hi!');
});
Receive
peer.on('connection', function(conn) {
conn.on('data', function(data){
// Will print 'hi!'
console.log(data);
});
});
Call
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
navigator.getUserMedia({video: true, audio: true}, function(stream) {
var call = peer.call('another-peers-id', stream);
call.on('stream', function(remoteStream) {
// Show stream in some <video> element.
});
}, function(err) {
console.log('Failed to get local stream' ,err);
});
Answer
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
peer.on('call', function(call) {
navigator.getUserMedia({video: true, audio: true}, function(stream) {
call.answer(stream); // Answer the call with an A/V stream.
call.on('stream', function(remoteStream) {
// Show stream in some <video> element.
});
}, function(err) {
console.log('Failed to get local stream' ,err);
});
});
FAQs
This branch is a customized version of PeerJS for NTT Communications's WebRTC platform SkyWay.
The npm package skyway-peerjs receives a total of 7 weekly downloads. As such, skyway-peerjs popularity was classified as not popular.
We found that skyway-peerjs 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.