Skip to content

Commit

Permalink
remove sound play
Browse files Browse the repository at this point in the history
  • Loading branch information
sravan-abacus committed Dec 13, 2024
1 parent 52ddb20 commit 90a1713
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions app/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1765,21 +1765,22 @@ const UI = {
},

bell(e) {
if (UI.getSetting('bell') === 'on') {
const promise = document.getElementById('noVNC_bell').play();
// The standards disagree on the return value here
if (promise) {
promise.catch((e) => {
if (e.name === "NotAllowedError") {
// Ignore when the browser doesn't let us play audio.
// It is common that the browsers require audio to be
// initiated from a user action.
} else {
Log.Error("Unable to play bell: " + e);
}
});
}
}
return;
// if (UI.getSetting('bell') === 'on') {
// const promise = document.getElementById('noVNC_bell').play();
// // The standards disagree on the return value here
// if (promise) {
// promise.catch((e) => {
// if (e.name === "NotAllowedError") {
// // Ignore when the browser doesn't let us play audio.
// // It is common that the browsers require audio to be
// // initiated from a user action.
// } else {
// Log.Error("Unable to play bell: " + e);
// }
// });
// }
// }
},

//Helper to add options to dropdown.
Expand Down

0 comments on commit 90a1713

Please sign in to comment.