diff --git a/app/sounds/CREDITS b/app/sounds/CREDITS new file mode 100644 index 00000000..ec1fb556 --- /dev/null +++ b/app/sounds/CREDITS @@ -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 diff --git a/app/sounds/bell.mp3 b/app/sounds/bell.mp3 new file mode 100644 index 00000000..fdbf149a Binary files /dev/null and b/app/sounds/bell.mp3 differ diff --git a/app/sounds/bell.oga b/app/sounds/bell.oga new file mode 100644 index 00000000..144d2b36 Binary files /dev/null and b/app/sounds/bell.oga differ diff --git a/app/styles/base.css b/app/styles/base.css index 4431908d..bd1d5051 100644 --- a/app/styles/base.css +++ b/app/styles/base.css @@ -571,6 +571,10 @@ input[type=button]:active, select:active { display: none; } +#noVNC_bell { + display: none; +} + /* ---------------------------------------- * Media sizing * ---------------------------------------- diff --git a/app/ui.js b/app/ui.js index ee0b6dbb..9fb8d40c 100644 --- a/app/ui.js +++ b/app/ui.js @@ -341,6 +341,7 @@ var UI; 'onUpdateState': UI.updateState, 'onXvpInit': UI.updateXvpButton, 'onClipboard': UI.clipboardReceive, + 'onBell': UI.bell, 'onFBUComplete': UI.initialResize, 'onFBResize': UI.updateViewDrag, 'onDesktopName': UI.updateDocumentTitle}); @@ -1524,6 +1525,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"); diff --git a/vnc.html b/vnc.html index d6348e5c..0afa0255 100644 --- a/vnc.html +++ b/vnc.html @@ -294,6 +294,12 @@ + + +