Try-catch Audio fallback

This commit is contained in:
Mattias Erming 2014-09-10 10:04:27 -07:00
parent ced6227818
commit 37b68b7bc4
3 changed files with 10 additions and 4 deletions

File diff suppressed because one or more lines are too long

View file

@ -31,8 +31,14 @@ $(function() {
var sidebar = $("#sidebar");
var chat = $("#chat");
var pop = new Audio();
pop.src = "/audio/pop.ogg";
try {
var pop = new Audio();
pop.src = "/audio/pop.ogg";
} catch(e) {
var pop = {
play: $.noop
};
}
$("#play").on("click", function() { pop.play(); });
$("#footer .icon").tooltip();

View file

@ -1,7 +1,7 @@
{
"name": "shout",
"description": "A web IRC client",
"version": "0.21.2",
"version": "0.21.3",
"author": "Mattias Erming",
"preferGlobal": true,
"bin": {