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 sidebar = $("#sidebar");
var chat = $("#chat"); var chat = $("#chat");
var pop = new Audio(); try {
pop.src = "/audio/pop.ogg"; var pop = new Audio();
pop.src = "/audio/pop.ogg";
} catch(e) {
var pop = {
play: $.noop
};
}
$("#play").on("click", function() { pop.play(); }); $("#play").on("click", function() { pop.play(); });
$("#footer .icon").tooltip(); $("#footer .icon").tooltip();

View file

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