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:
parent
33e1462999
commit
63bf2ba578
|
@ -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.
|
@ -409,6 +409,10 @@ html {
|
||||||
color:green;
|
color:green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#noVNC_bell {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------
|
/* ----------------------------------------
|
||||||
* Media sizing
|
* Media sizing
|
||||||
* ----------------------------------------
|
* ----------------------------------------
|
||||||
|
|
|
@ -205,6 +205,7 @@ var UI;
|
||||||
'onUpdateState': UI.updateState,
|
'onUpdateState': UI.updateState,
|
||||||
'onXvpInit': UI.updateXvpButton,
|
'onXvpInit': UI.updateXvpButton,
|
||||||
'onClipboard': UI.clipboardReceive,
|
'onClipboard': UI.clipboardReceive,
|
||||||
|
'onBell': UI.bell,
|
||||||
'onFBUComplete': UI.initialResize,
|
'onFBUComplete': UI.initialResize,
|
||||||
'onFBResize': UI.updateViewDrag,
|
'onFBResize': UI.updateViewDrag,
|
||||||
'onDesktopName': UI.updateDocumentTitle});
|
'onDesktopName': UI.updateDocumentTitle});
|
||||||
|
@ -1280,6 +1281,12 @@ var UI;
|
||||||
document.title = name + " - noVNC";
|
document.title = name + " - noVNC";
|
||||||
},
|
},
|
||||||
|
|
||||||
|
bell: function(rfb) {
|
||||||
|
if (WebUtil.getConfigVar('bell', 'on') === 'on') {
|
||||||
|
document.getElementById('noVNC_bell').play();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
//Helper to add options to dropdown.
|
//Helper to add options to dropdown.
|
||||||
addOption: function(selectbox, text, value) {
|
addOption: function(selectbox, text, value) {
|
||||||
var optn = document.createElement("OPTION");
|
var optn = document.createElement("OPTION");
|
||||||
|
|
6
vnc.html
6
vnc.html
|
@ -218,6 +218,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<audio id="noVNC_bell">
|
||||||
|
<source src="app/sounds/bell.oga" type="audio/ogg">
|
||||||
|
<source src="app/sounds/bell.mp3" type="audio/mpeg">
|
||||||
|
</audio>
|
||||||
|
|
||||||
<!-- begin scripts -->
|
<!-- begin scripts -->
|
||||||
<script src="core/util.js"></script>
|
<script src="core/util.js"></script>
|
||||||
<script src="app/webutil.js"></script>
|
<script src="app/webutil.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue