Mark desktop apps as having sound enabled regardless of webkit

(imported from commit 478fdead0fa43b0706fd0af09c8d890eec0ce5e1)
This commit is contained in:
Leo Franchi
2013-07-05 14:47:41 -04:00
parent 8f58647ff6
commit 26c66b17a9

View File

@@ -40,6 +40,12 @@ exports.initialize = function () {
});
}
if (window.bridge !== undefined) {
supports_sound = true;
return;
}
if (!window.webkitNotifications) {
return;
}
@@ -53,10 +59,9 @@ exports.initialize = function () {
asked_permission_already = true;
}
});
var audio = $("<audio>");
if (window.bridge !== undefined) {
supports_sound = true;
} else if (audio[0].canPlayType === undefined) {
if (audio[0].canPlayType === undefined) {
supports_sound = false;
} else {
supports_sound = true;