mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Don't register createjs.FlashPlugin if undefined
This was completely breaking IE 11/10/9. Audio still seems to work fine with this change.
This commit is contained in:
parent
2b8006ff83
commit
3c161268f0
1 changed files with 7 additions and 1 deletions
|
@ -7,7 +7,13 @@ cache = {}
|
|||
rot13 = (s) -> s.replace /[A-z]/g, (c) -> String.fromCharCode c.charCodeAt(0) + (if c.toUpperCase() <= 'M' then 13 else -13)
|
||||
swears = (rot13 s for s in ['nefrubyr', 'nffubyr', 'onfgneq', 'ovgpu', 'oybbql', 'obyybpxf', 'ohttre', 'pbpx', 'penc', 'phag', 'qnza', 'qnea', 'qvpx', 'qbhpur', 'snt', 'shpx', 'cvff', 'chffl', 'fuvg', 'fyhg', 'svqqyrfgvpxf'])
|
||||
|
||||
createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.FlashPlugin, createjs.HTMLAudioPlugin])
|
||||
# IE(11, 10, 9) throws an exception if createjs.FlashPlugin is undefined
|
||||
# Chrome and Firefox don't seem to care that it's undefined
|
||||
if createjs.FlashPlugin?
|
||||
soundPlugins = [createjs.WebAudioPlugin, createjs.FlashPlugin, createjs.HTMLAudioPlugin]
|
||||
else
|
||||
soundPlugins = [createjs.WebAudioPlugin, createjs.HTMLAudioPlugin]
|
||||
createjs.Sound.registerPlugins(soundPlugins)
|
||||
|
||||
class Manifest
|
||||
constructor: -> @storage = {}
|
||||
|
|
Loading…
Reference in a new issue