Support RFB bell

The protocol handling was already there. What was missing was
hooking it up to a sound file in the user interface.
This commit is contained in:
Pierre Ossman
2016-09-19 15:15:07 +02:00
parent 33e1462999
commit 63bf2ba578
6 changed files with 21 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
bell
Copyright: Dr. Richard Boulanger et al
URL: http://www.archive.org/details/Berklee44v12
License: CC-BY Attribution 3.0 Unported
Binary file not shown.
Binary file not shown.
+4
View File
@@ -409,6 +409,10 @@ html {
color:green;
}
#noVNC_bell {
display: none;
}
/* ----------------------------------------
* Media sizing
* ----------------------------------------
+7
View File
@@ -205,6 +205,7 @@ var UI;
'onUpdateState': UI.updateState,
'onXvpInit': UI.updateXvpButton,
'onClipboard': UI.clipboardReceive,
'onBell': UI.bell,
'onFBUComplete': UI.initialResize,
'onFBResize': UI.updateViewDrag,
'onDesktopName': UI.updateDocumentTitle});
@@ -1280,6 +1281,12 @@ var UI;
document.title = name + " - noVNC";
},
bell: function(rfb) {
if (WebUtil.getConfigVar('bell', 'on') === 'on') {
document.getElementById('noVNC_bell').play();
}
},
//Helper to add options to dropdown.
addOption: function(selectbox, text, value) {
var optn = document.createElement("OPTION");