diff --git a/html5/verto/verto_communicator/js/3rd-party/volume-meter.js b/html5/verto/verto_communicator/js/3rd-party/volume-meter.js
new file mode 100644
index 0000000000..a4ac33a4a9
--- /dev/null
+++ b/html5/verto/verto_communicator/js/3rd-party/volume-meter.js
@@ -0,0 +1,96 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) 2014 Chris Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/*
+
+Usage:
+audioNode = createAudioMeter(audioContext,clipLevel,averaging,clipLag);
+
+audioContext: the AudioContext you're using.
+clipLevel: the level (0 to 1) that you would consider "clipping".
+ Defaults to 0.98.
+averaging: how "smoothed" you would like the meter to be over time.
+ Should be between 0 and less than 1. Defaults to 0.95.
+clipLag: how long you would like the "clipping" indicator to show
+ after clipping has occured, in milliseconds. Defaults to 750ms.
+
+Access the clipping through node.checkClipping(); use node.shutdown to get rid of it.
+*/
+
+function createAudioMeter(audioContext,clipLevel,averaging,clipLag) {
+ var processor = audioContext.createScriptProcessor(512);
+ processor.onaudioprocess = volumeAudioProcess;
+ processor.clipping = false;
+ processor.lastClip = 0;
+ processor.volume = 0;
+ processor.clipLevel = clipLevel || 0.98;
+ processor.averaging = averaging || 0.95;
+ processor.clipLag = clipLag || 750;
+
+ // this will have no effect, since we don't copy the input to the output,
+ // but works around a current Chrome bug.
+ processor.connect(audioContext.destination);
+
+ processor.checkClipping =
+ function(){
+ if (!this.clipping)
+ return false;
+ if ((this.lastClip + this.clipLag) < window.performance.now())
+ this.clipping = false;
+ return this.clipping;
+ };
+
+ processor.shutdown =
+ function(){
+ this.disconnect();
+ this.onaudioprocess = null;
+ };
+
+ return processor;
+}
+
+function volumeAudioProcess( event ) {
+ var buf = event.inputBuffer.getChannelData(0);
+ var bufLength = buf.length;
+ var sum = 0;
+ var x;
+
+ // Do a root-mean-square on the samples: sum up the squares...
+ for (var i=0; i=this.clipLevel) {
+ this.clipping = true;
+ this.lastClip = window.performance.now();
+ }
+ sum += x * x;
+ }
+
+ // ... then take the square root of the sum.
+ var rms = Math.sqrt(sum / bufLength);
+
+ // Now smooth this out with the averaging factor applied
+ // to the previous sample - take the max here because we
+ // want "fast attack, slow release."
+ this.volume = Math.max(rms, this.volume*this.averaging);
+}
diff --git a/html5/verto/verto_communicator/src/css/verto.css b/html5/verto/verto_communicator/src/css/verto.css
index 9d75a32037..c9694e15d3 100644
--- a/html5/verto/verto_communicator/src/css/verto.css
+++ b/html5/verto/verto_communicator/src/css/verto.css
@@ -8,6 +8,10 @@ body {
padding-top: 60px;
}
+.panel.panel-material-blue-900 .panel-heading {
+ background-color: #0d47a1;
+}
+
.install {
color: white;
text-decoration: underline;
@@ -1469,3 +1473,39 @@ body:-webkit-full-screen #incall .video-footer {
}
}
+
+.preview-wrapper {
+ position: relative;
+}
+
+.preview-wrapper video {
+ transform: scaleX(-1);
+}
+#mic-meter {
+ position: absolute;
+ bottom: 5px;
+ left: 10px;
+}
+#mic-meter .icon {
+ margin-left: 3px;
+ color: white;
+}
+#mic-meter .volumes {
+ width: 30px;
+}
+#mic-meter .volumes .volume-segment {
+ height: 10px;
+ width: 100%;
+ border-radius: 5px;
+ border: 2px solid white;
+ display: block;
+ margin-top: 1.5px;
+}
+
+#mic-meter .volumes .volume-segment.active {
+ background-color: white;
+}
+
+#preview .refresh {
+ margin: 15px 0px 0px 0px;
+}
diff --git a/html5/verto/verto_communicator/src/index.html b/html5/verto/verto_communicator/src/index.html
index c450607c9f..47bdf740cd 100644
--- a/html5/verto/verto_communicator/src/index.html
+++ b/html5/verto/verto_communicator/src/index.html
@@ -95,6 +95,7 @@
+
@@ -113,6 +114,7 @@
+
diff --git a/html5/verto/verto_communicator/src/partials/preview.html b/html5/verto/verto_communicator/src/partials/preview.html
new file mode 100644
index 0000000000..947b0afb04
--- /dev/null
+++ b/html5/verto/verto_communicator/src/partials/preview.html
@@ -0,0 +1,70 @@
+
+
+