rtcpeerconnection
Advanced tools
Comparing version 2.6.4 to 2.6.5
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157818
12
4121