Socket
Socket
Sign inDemoInstall

rtcpeerconnection

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtcpeerconnection - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

2

package.json
{
"name": "rtcpeerconnection",
"version": "0.2.0",
"version": "0.3.0",
"description": "A tiny browser module that gives normalizes and simplifies the API for WebRTC peer connections.",

@@ -5,0 +5,0 @@ "main": "rtcpeerconnection.js",

@@ -108,3 +108,3 @@ # RTCPeerConnection

function (err, offer) {
if (!err) connection.send('offer, offer);
if (!err) connection.send('offer', offer);
}

@@ -111,0 +111,0 @@ );

@@ -88,7 +88,7 @@ (function(e){if("function"==typeof bootstrap)bootstrap("peerconnection",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makePeerConnection=e}else"undefined"!=typeof window?window.PeerConnection=e():global.PeerConnection=e()})(function(){var define,ses,bootstrap,module,exports;

PeerConnection.prototype.answerVideoOnly = function (offer, cb) {
PeerConnection.prototype.answerBroadcastOnly = function (offer, cb) {
var mediaConstraints = {
mandatory: {
OfferToReceiveAudio: false,
OfferToReceiveVideo: true
OfferToReceiveVideo: false
}

@@ -141,3 +141,30 @@ };

},{"wildemitter":2,"webrtcsupport":3}],2:[function(require,module,exports){
},{"webrtcsupport":2,"wildemitter":3}],2:[function(require,module,exports){
// created by @HenrikJoreteg
var PC = window.mozRTCPeerConnection || window.webkitRTCPeerConnection || window.RTCPeerConnection;
var IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate;
var SessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription;
var prefix = function () {
if (window.mozRTCPeerConnection) {
return 'moz';
} else if (window.webkitRTCPeerConnection) {
return 'webkit';
}
}();
var screenSharing = navigator.userAgent.match('Chrome') && parseInt(navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26;
var webAudio = !!window.webkitAudioContext;
// export support flags and constructors.prototype && PC
module.exports = {
support: !!PC,
dataChannel: !!(PC && PC.prototype && PC.prototype.createDataChannel),
prefix: prefix,
webAudio: webAudio,
screenSharing: screenSharing,
PeerConnection: PC,
SessionDescription: SessionDescription,
IceCandidate: IceCandidate
};
},{}],3:[function(require,module,exports){
/*

@@ -279,31 +306,4 @@ WildEmitter.js is a slim little event emitter by @henrikjoreteg largely based

},{}],3:[function(require,module,exports){
// created by @HenrikJoreteg
var PC = window.mozRTCPeerConnection || window.webkitRTCPeerConnection || window.RTCPeerConnection;
var IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate;
var SessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription;
var prefix = function () {
if (window.mozRTCPeerConnection) {
return 'moz';
} else if (window.webkitRTCPeerConnection) {
return 'webkit';
}
}();
var screenSharing = navigator.userAgent.match('Chrome') && parseInt(navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26;
var webAudio = !!window.webkitAudioContext;
// export support flags and constructors.prototype && PC
module.exports = {
support: !!PC,
dataChannel: !!(PC && PC.prototype && PC.prototype.createDataChannel),
prefix: prefix,
webAudio: webAudio,
screenSharing: screenSharing,
PeerConnection: PC,
SessionDescription: SessionDescription,
IceCandidate: IceCandidate
};
},{}]},{},[1])(1)
});
;

@@ -86,7 +86,7 @@ var WildEmitter = require('wildemitter');

PeerConnection.prototype.answerVideoOnly = function (offer, cb) {
PeerConnection.prototype.answerBroadcastOnly = function (offer, cb) {
var mediaConstraints = {
mandatory: {
OfferToReceiveAudio: false,
OfferToReceiveVideo: true
OfferToReceiveVideo: false
}

@@ -93,0 +93,0 @@ };

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc