Try-catch Audio fallback
This commit is contained in:
parent
ced6227818
commit
37b68b7bc4
File diff suppressed because one or more lines are too long
@ -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();
|
||||||
|
@ -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": {
|
||||||
|
Loading…
Reference in New Issue
Block a user