[Pkg-voip-commits] [janus] 165/282: Added way to provide custom PeerConnection constraints (see #1028)

Jonas Smedegaard dr at jones.dk
Wed Dec 20 21:53:38 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.2.6-1
in repository janus.

commit 30bbf335cfc6f9c4a45068c3298837cb6a3d24aa
Author: Lorenzo Miniero <lminiero at gmail.com>
Date:   Thu Nov 2 19:11:59 2017 +0100

    Added way to provide custom PeerConnection constraints (see #1028)
---
 html/janus.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/html/janus.js b/html/janus.js
index 0e8c5b2..79bdc0e 100644
--- a/html/janus.js
+++ b/html/janus.js
@@ -1314,6 +1314,13 @@ function Janus(gatewayCallbacks) {
 			// For support in Firefox track this: https://bugzilla.mozilla.org/show_bug.cgi?id=797262
 			pc_constraints.optional.push({"googIPv6":true});
 		}
+		// Any custom constraint to add?
+		if(callbacks.rtcConstraints && typeof callbacks.rtcConstraints === 'object') {
+			Janus.debug("Adding custom PeerConnection constraints:", callbacks.rtcConstraints);
+			for(var i in callbacks.rtcConstraints) {
+				pc_constraints.optional.push(callbacks.rtcConstraints[i]);
+			}
+		}
 		if(Janus.webRTCAdapter.browserDetails.browser === "edge") {
 			// This is Edge, enable BUNDLE explicitly
 			pc_config.bundlePolicy = "max-bundle";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git



More information about the Pkg-voip-commits mailing list