Socket
Socket
Sign inDemoInstall

wrtc

Package Overview
Dependencies
69
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.5 to 0.4.6

lib/mediadevices.js

12

lib/browser.js
'use strict';
exports.MediaStream = window.MediaStream;
exports.MediaStreamTrack = window.MediaStreamTrack;
exports.RTCDataChannel = window.RTCDataChannel;
exports.RTCDataChannelEvent = window.RTCDataChannelEvent;
exports.RTCDtlsTransport = window.RTCDtlsTransport;
exports.RTCIceCandidate = window.RTCIceCandidate;
exports.RTCIceTransport = window.RTCIceTransport;
exports.RTCPeerConnection = window.RTCPeerConnection;
exports.RTCPeerConnectionIceEvent = window.RTCPeerConnectionIceEvent;
exports.RTCRtpReceiver = window.RTCRtpReceiver;
exports.RTCRtpSender = window.RTCRtpSender;
exports.RTCRtpTransceiver = window.RTCRtpTransceiver;
exports.RTCSctpTransport = window.RTCSctpTransport;
exports.RTCSessionDescription = window.RTCSessionDescription;
exports.getUserMedia = window.getUserMedia;
exports.mediaDevices = navigator.mediaDevices;

4

lib/index.js

@@ -26,2 +26,3 @@ 'use strict';

const EventTarget = require('./eventtarget');
const MediaDevices = require('./mediadevices');

@@ -52,2 +53,4 @@ inherits(MediaStream, EventTarget);

const mediaDevices = new MediaDevices();
const nonstandard = {

@@ -78,3 +81,4 @@ i420ToRgba,

getUserMedia,
mediaDevices,
nonstandard,
};

66

lib/peerconnection.js

@@ -40,3 +40,3 @@ 'use strict';

var icecandidate = new RTCIceCandidate(candidate);
self.dispatchEvent(new RTCPeerConnectionIceEvent('icecandidate', { candidate: icecandidate }));
self.dispatchEvent(new RTCPeerConnectionIceEvent('icecandidate', { candidate: icecandidate, target: self }));
};

@@ -53,15 +53,15 @@

pc.onsignalingstatechange = function onsignalingstatechange() {
self.dispatchEvent({ type: 'signalingstatechange' });
self.dispatchEvent({ type: 'signalingstatechange', target: self });
};
pc.oniceconnectionstatechange = function oniceconnectionstatechange() {
self.dispatchEvent({ type: 'iceconnectionstatechange' });
self.dispatchEvent({ type: 'iceconnectionstatechange', target: self });
};
pc.onicegatheringstatechange = function onicegatheringstatechange() {
self.dispatchEvent({ type: 'icegatheringstatechange' });
self.dispatchEvent({ type: 'icegatheringstatechange', target: self });
// if we have completed gathering candidates, trigger a null candidate event
if (self.iceGatheringState === 'complete' && self.connectionState !== 'closed') {
self.dispatchEvent(new RTCPeerConnectionIceEvent('icecandidate', { candidate: null }));
self.dispatchEvent(new RTCPeerConnectionIceEvent('icecandidate', { candidate: null, target: self }));
}

@@ -71,3 +71,3 @@ };

pc.onnegotiationneeded = function onnegotiationneeded() {
self.dispatchEvent({ type: 'negotiationneeded' });
self.dispatchEvent({ type: 'negotiationneeded', target: self });
};

@@ -92,3 +92,4 @@

return pc.canTrickleIceCandidates;
}
},
enumerable: true
},

@@ -98,3 +99,4 @@ connectionState: {

return pc.connectionState;
}
},
enumerable: true
},

@@ -106,3 +108,4 @@ currentLocalDescription: {

: null;
}
},
enumerable: true
},

@@ -114,3 +117,4 @@ localDescription: {

: null;
}
},
enumerable: true
},

@@ -122,3 +126,4 @@ pendingLocalDescription: {

: null;
}
},
enumerable: true
},

@@ -130,3 +135,4 @@ currentRemoteDescription: {

: null;
}
},
enumerable: true
},

@@ -138,3 +144,4 @@ remoteDescription: {

: null;
}
},
enumerable: true
},

@@ -146,3 +153,4 @@ pendingRemoteDescription: {

: null;
}
},
enumerable: true
},

@@ -152,3 +160,4 @@ signalingState: {

return pc.signalingState;
}
},
enumerable: true
},

@@ -163,3 +172,4 @@ readyState: {

return pc.sctp;
}
},
enumerable: true
},

@@ -169,3 +179,4 @@ iceGatheringState: {

return pc.iceGatheringState;
}
},
enumerable: true
},

@@ -175,27 +186,34 @@ iceConnectionState: {

return pc.iceConnectionState;
}
},
enumerable: true
},
onconnectionstatechange: {
value: null,
writable: true
writable: true,
enumerable: true
},
ondatachannel: {
value: null,
writable: true
writable: true,
enumerable: true
},
oniceconnectionstatechange: {
value: null,
writable: true
writable: true,
enumerable: true
},
onicegatheringstatechange: {
value: null,
writable: true
writable: true,
enumerable: true
},
onnegotiationneeded: {
value: null,
writable: true
writable: true,
enumerable: true
},
onsignalingstatechange: {
value: null,
writable: true
writable: true,
enumerable: true
}

@@ -202,0 +220,0 @@ });

@@ -12,2 +12,6 @@ 'use strict';

enumerable: true
},
target: {
value: eventInitDict.target,
enumerable: true
}

@@ -14,0 +18,0 @@ });

@@ -15,3 +15,3 @@ {

],
"version": "0.4.5",
"version": "0.4.6",
"author": "Alan K <ack@modeswitch.org> (http://blog.modeswitch.org)",

@@ -35,3 +35,3 @@ "homepage": "https://github.com/node-webrtc/node-webrtc",

"engines": {
"node": "^8.11.2 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0"
"node": "^8.11.2 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0"
},

@@ -38,0 +38,0 @@ "optionalDependencies": {

@@ -8,3 +8,3 @@ <h1 align="center">

node-webrtc is a Node.js Native Addon that provides bindings to [WebRTC M81](https://chromium.googlesource.com/external/webrtc/+/branch-heads/4044). This project aims for spec-compliance and is tested using the W3C's [web-platform-tests](https://github.com/web-platform-tests/wpt) project. A number of [nonstandard APIs](https://github.com/node-webrtc/node-webrtc/blob/v0.4.5/docs/nonstandard-apis.md) for testing are also included.
node-webrtc is a Node.js Native Addon that provides bindings to [WebRTC M81](https://chromium.googlesource.com/external/webrtc/+/branch-heads/4044). This project aims for spec-compliance and is tested using the W3C's [web-platform-tests](https://github.com/web-platform-tests/wpt) project. A number of [nonstandard APIs](https://github.com/node-webrtc/node-webrtc/blob/v0.4.6/docs/nonstandard-apis.md) for testing are also included.

@@ -20,3 +20,3 @@ Install

You can also [build from source](https://github.com/node-webrtc/node-webrtc/blob/v0.4.5/docs/build-from-source.md).
You can also [build from source](https://github.com/node-webrtc/node-webrtc/blob/v0.4.6/docs/build-from-source.md).

@@ -26,3 +26,3 @@ Supported Platforms

The following platforms are confirmed to work with node-webrtc and have prebuilt binaries available. Since node-webrtc targets [N-API version 3](https://nodejs.org/api/n-api.html), there may be additional platforms supported that are not listed here. If your platform is not supported, you may still be able to [build from source](https://github.com/node-webrtc/node-webrtc/blob/v0.4.5/docs/build-from-source.md).
The following platforms are confirmed to work with node-webrtc and have prebuilt binaries available. Since node-webrtc targets [N-API version 3](https://nodejs.org/api/n-api.html), there may be additional platforms supported that are not listed here. If your platform is not supported, you may still be able to [build from source](https://github.com/node-webrtc/node-webrtc/blob/v0.4.6/docs/build-from-source.md).

@@ -29,0 +29,0 @@ <table>

@@ -7,3 +7,3 @@ #!/usr/bin/env node

function main() {
function main(exit) {
const args = ['install'];

@@ -24,2 +24,6 @@

if (status) {
if (!exit) {
throw new Error(status);
}
process.exit(1);

@@ -32,3 +36,3 @@ }

if (require.main === module) {
main();
main(true);
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc