Socket
Socket
Sign inDemoInstall

rtcpeerconnection

Package Overview
Dependencies
Maintainers
4
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 2.6.4 to 2.6.5

mshacks.patch

4

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

@@ -8,3 +8,3 @@ "main": "rtcpeerconnection.js",

"type": "git",
"url": "https://github.com/HenrikJoreteg/RTCPeerConnection"
"url": "https://github.com/otalk/RTCPeerConnection"
},

@@ -11,0 +11,0 @@ "keywords": [

@@ -40,3 +40,3 @@ # RTCPeerConnection

Unlike stock Peer Connections this inherits from a generic event emitter. Powered by [WildEmitter](http://github.com/henrikjoreteg/wildemitter) which has a very familiar API if you're used to node.js/jQUery/Backbone but also includes a wildcard handler so you can easily debug events. Just do `emitter.on('*')` to log them out or whatnot.
Unlike stock Peer Connections this inherits from a generic event emitter. Powered by [WildEmitter](http://github.com/henrikjoreteg/wildemitter) which has a very familiar API if you're used to node.js/jQuery/Backbone but also includes a wildcard handler so you can easily debug events. Just do `emitter.on('*')` to log them out or whatnot.

@@ -43,0 +43,0 @@ But instead of doing `pc.onicecandidate = function () {}` on a peer connection you listen for events like this:

@@ -17,2 +17,3 @@ var _ = require('underscore');

// make sure this only gets enabled in Google Chrome
// EXPERIMENTAL FLAG, might get removed without notice
this.enableChromeNativeSimulcast = false;

@@ -29,2 +30,12 @@ if (constraints && constraints.optional &&

// EXPERIMENTAL FLAG, might get removed without notice
this.enableMultiStreamHacks = false;
if (constraints && constraints.optional) {
constraints.optional.forEach(function (constraint, idx) {
if (constraint.enableMultiStreamHacks) {
self.enableMultiStreamHacks = true;
}
});
}
this.pc = new peerconn(config, constraints);

@@ -257,2 +268,26 @@

}
if (this.enableMultiStreamHacks) {
// add a mixed video stream as first stream
offer.jingle.contents.forEach(function (content) {
if (content.name === 'video') {
var sources = content.description.sources || [];
if (sources.length === 0 || sources[0].ssrc !== "3735928559") {
sources.unshift({
ssrc: "3735928559", // 0xdeadbeef
parameters: [
{
key: "cname",
value: "deadbeef"
},
{
key: "msid",
value: "mixyourfecintothis please"
}
]
});
content.description.sources = sources;
}
}
});
}
offer.sdp = SJJ.toSessionSDP(offer.jingle, self.config.sdpSessionID);

@@ -259,0 +294,0 @@ self.remoteDescription = offer.jingle;

Sorry, the diff of this file is too big to display

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