diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-18 14:46:52 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-18 14:46:52 -0700 |
commit | d5156ffbf4ebe36f1ec13202f230e271a8616a24 (patch) | |
tree | 17759a577823071cf62b7cd0ac6e478e96d1f03f | |
parent | ac164b522eb5c07067fb7781e29585f950ad1699 (diff) |
fake Audio in workers
-rw-r--r-- | src/proxyWorker.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/proxyWorker.js b/src/proxyWorker.js index b542ff1d..571a5ba1 100644 --- a/src/proxyWorker.js +++ b/src/proxyWorker.js @@ -114,6 +114,17 @@ document.styleSheets = [{ } }]; +function Audio() { + Runtime.warnOnce('faking Audio elements, no actual sound will play'); +} + +Audio.prototype.play = function(){}; +Audio.prototype.pause = function(){}; + +Audio.prototype.cloneNode = function() { + return new Audio; +} + if (typeof console === 'undefined') { var console = { log: function(x) { |