[Pkg-voip-commits] [janus] 156/282: Fixed some checks in the web demos

Jonas Smedegaard dr at jones.dk
Wed Dec 20 21:53:37 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 6d98a5e029ddc394eb0edf8b1a396718e2d1b88c
Author: Lorenzo Miniero <lminiero at gmail.com>
Date:   Wed Oct 25 16:37:02 2017 +0200

    Fixed some checks in the web demos
---
 html/devicetest.js    |  4 ++--
 html/echotest.js      |  4 ++--
 html/sipretest.js     |  2 +-
 html/siptest.js       |  2 +-
 html/streamingtest.js |  8 ++++----
 html/videocalltest.js |  4 ++--
 html/videoroomtest.js | 12 +++++++-----
 html/vp9svctest.js    |  2 +-
 8 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/html/devicetest.js b/html/devicetest.js
index 6ce7723..af845a7 100644
--- a/html/devicetest.js
+++ b/html/devicetest.js
@@ -390,8 +390,8 @@ $(document).ready(function() {
 										echotest.send({"message": { "bitrate": bitrate }});
 										return false;
 									});
-									if(adapter.browserDetails.browser === "chrome" || adapter.browserDetails.browser === "firefox" ||
-											adapter.browserDetails.browser === "safari") {
+									if(Janus.webRTCAdapter.browserDetails.browser === "chrome" || Janus.webRTCAdapter.browserDetails.browser === "firefox" ||
+											Janus.webRTCAdapter.browserDetails.browser === "safari") {
 										$('#curbitrate').removeClass('hide').show();
 										bitrateTimer = setInterval(function() {
 											// Display updated bitrate, if supported
diff --git a/html/echotest.js b/html/echotest.js
index f1ee018..b11e7e8 100644
--- a/html/echotest.js
+++ b/html/echotest.js
@@ -320,8 +320,8 @@ $(document).ready(function() {
 										echotest.send({"message": { "bitrate": bitrate }});
 										return false;
 									});
-									if(adapter.browserDetails.browser === "chrome" || adapter.browserDetails.browser === "firefox" ||
-											adapter.browserDetails.browser === "safari") {
+									if(Janus.webRTCAdapter.browserDetails.browser === "chrome" || Janus.webRTCAdapter.browserDetails.browser === "firefox" ||
+											Janus.webRTCAdapter.browserDetails.browser === "safari") {
 										$('#curbitrate').removeClass('hide').show();
 										bitrateTimer = setInterval(function() {
 											// Display updated bitrate, if supported
diff --git a/html/sipretest.js b/html/sipretest.js
index e8e06d5..bc5459e 100644
--- a/html/sipretest.js
+++ b/html/sipretest.js
@@ -373,7 +373,7 @@ $(document).ready(function() {
 											$('#dtmf').append('<button class="btn btn-info dtmf">*</button>');
 									}
 									$('.dtmf').click(function() {
-										if(adapter.browserDetails.browser === 'chrome') {
+										if(Janus.webRTCAdapter.browserDetails.browser === 'chrome') {
 											// Send DTMF tone (inband)
 											sipcall.dtmf({dtmf: { tones: $(this).text()}});
 										} else {
diff --git a/html/siptest.js b/html/siptest.js
index 73aeb54..02cdf8c 100644
--- a/html/siptest.js
+++ b/html/siptest.js
@@ -376,7 +376,7 @@ $(document).ready(function() {
 											$('#dtmf').append('<button class="btn btn-info dtmf">*</button>');
 									}
 									$('.dtmf').click(function() {
-										if(adapter.browserDetails.browser === 'chrome') {
+										if(Janus.webRTCAdapter.browserDetails.browser === 'chrome') {
 											// Send DTMF tone (inband)
 											sipcall.dtmf({dtmf: { tones: $(this).text()}});
 										} else {
diff --git a/html/streamingtest.js b/html/streamingtest.js
index 46b829f..e4f2c97 100644
--- a/html/streamingtest.js
+++ b/html/streamingtest.js
@@ -187,7 +187,7 @@ $(document).ready(function() {
 										var width = this.videoWidth;
 										var height = this.videoHeight;
 										$('#curres').removeClass('hide').text(width+'x'+height).show();
-										if(adapter.browserDetails.browser === "firefox") {
+										if(Janus.webRTCAdapter.browserDetails.browser === "firefox") {
 											// Firefox Stable has a bug: width and height are not immediately available after a playing
 											setTimeout(function() {
 												var width = $("#remotevideo").get(0).videoWidth;
@@ -198,9 +198,9 @@ $(document).ready(function() {
 									});
 									var videoTracks = stream.getVideoTracks();
 									if(videoTracks && videoTracks.length &&
-											(adapter.browserDetails.browser === "chrome" ||
-												adapter.browserDetails.browser === "firefox" ||
-												adapter.browserDetails.browser === "safari")) {
+											(Janus.webRTCAdapter.browserDetails.browser === "chrome" ||
+												Janus.webRTCAdapter.browserDetails.browser === "firefox" ||
+												Janus.webRTCAdapter.browserDetails.browser === "safari")) {
 										$('#curbitrate').removeClass('hide').show();
 										bitrateTimer = setInterval(function() {
 											// Display updated bitrate, if supported
diff --git a/html/videocalltest.js b/html/videocalltest.js
index 06c0c95..a6c7b9a 100644
--- a/html/videocalltest.js
+++ b/html/videocalltest.js
@@ -399,8 +399,8 @@ $(document).ready(function() {
 										videocall.send({"message": { "request": "set", "bitrate": bitrate }});
 										return false;
 									});
-									if(adapter.browserDetails.browser === "chrome" || adapter.browserDetails.browser === "firefox" ||
-											adapter.browserDetails.browser === "safari") {
+									if(Janus.webRTCAdapter.browserDetails.browser === "chrome" || Janus.webRTCAdapter.browserDetails.browser === "firefox" ||
+											Janus.webRTCAdapter.browserDetails.browser === "safari") {
 										$('#curbitrate').removeClass('hide').show();
 										bitrateTimer = setInterval(function() {
 											// Display updated bitrate, if supported
diff --git a/html/videoroomtest.js b/html/videoroomtest.js
index f6636d3..8185ec3 100644
--- a/html/videoroomtest.js
+++ b/html/videoroomtest.js
@@ -451,8 +451,10 @@ function newRemoteFeed(id, display, audio, video) {
 				// 'offer_data' properties to false (they're true by default), e.g.:
 				// 		listen["offer_video"] = false;
 				// For example, if the publisher is VP8 and this is Safari, let's avoid video
-				if(video === "vp8" && adapter.browserDetails.browser === "safari") {
-					toastr.warning("Publisher is using VP8, but Safari doesn't support it: disabling video");
+				if(video !== "h264" && Janus.webRTCAdapter.browserDetails.browser === "safari") {
+					if(video)
+						video = video.toUpperCase()
+					toastr.warning("Publisher is using " + video + ", but Safari doesn't support it: disabling video");
 					listen["offer_video"] = false;
 				}
 				remoteFeed.send({"message": listen});
@@ -563,7 +565,7 @@ function newRemoteFeed(id, display, audio, video) {
 					var width = this.videoWidth;
 					var height = this.videoHeight;
 					$('#curres'+remoteFeed.rfindex).removeClass('hide').text(width+'x'+height).show();
-					if(adapter.browserDetails.browser === "firefox") {
+					if(Janus.webRTCAdapter.browserDetails.browser === "firefox") {
 						// Firefox Stable has a bug: width and height are not immediately available after a playing
 						setTimeout(function() {
 							var width = $("#remotevideo"+remoteFeed.rfindex).get(0).videoWidth;
@@ -583,8 +585,8 @@ function newRemoteFeed(id, display, audio, video) {
 							'<span class="no-video-text" style="font-size: 16px;">No remote video available</span>' +
 						'</div>');
 				}
-				if(adapter.browserDetails.browser === "chrome" || adapter.browserDetails.browser === "firefox" ||
-						adapter.browserDetails.browser === "safari") {
+				if(Janus.webRTCAdapter.browserDetails.browser === "chrome" || Janus.webRTCAdapter.browserDetails.browser === "firefox" ||
+						Janus.webRTCAdapter.browserDetails.browser === "safari") {
 					$('#curbitrate'+remoteFeed.rfindex).removeClass('hide').show();
 					bitrateTimer[remoteFeed.rfindex] = setInterval(function() {
 						// Display updated bitrate, if supported
diff --git a/html/vp9svctest.js b/html/vp9svctest.js
index 7d59e79..e5e587c 100644
--- a/html/vp9svctest.js
+++ b/html/vp9svctest.js
@@ -537,7 +537,7 @@ function newRemoteFeed(id, display) {
 							'<span class="no-video-text" style="font-size: 16px;">No remote video available</span>' +
 						'</div>');
 				}
-				if(adapter.browserDetails.browser === "chrome" || adapter.browserDetails.browser === "firefox") {
+				if(Janus.webRTCAdapter.browserDetails.browser === "chrome" || Janus.webRTCAdapter.browserDetails.browser === "firefox") {
 					$('#curbitrate'+remoteFeed.rfindex).removeClass('hide').show();
 					bitrateTimer[remoteFeed.rfindex] = setInterval(function() {
 						// Display updated bitrate, if supported

-- 
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