mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-02 20:07:25 -05:00
Fixed a bug with the music player where sometimes it wouldn't loop.
This commit is contained in:
parent
eac219a2be
commit
da58b68fa0
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ module.exports = class MusicPlayer extends CocoClass
|
||||||
src = e.file
|
src = e.file
|
||||||
if src
|
if src
|
||||||
src = "/file#{src}#{AudioPlayer.ext}"
|
src = "/file#{src}#{AudioPlayer.ext}"
|
||||||
return @currentMusic.play() if src is @currentMusic?.src
|
return @currentMusic.play('none', 0, 0, -1, 0.3) if src is @currentMusic?.src
|
||||||
media = AudioPlayer.getStatus(src)
|
media = AudioPlayer.getStatus(src)
|
||||||
if not media?.loaded
|
if not media?.loaded
|
||||||
AudioPlayer.preloadSound(src)
|
AudioPlayer.preloadSound(src)
|
||||||
|
|
Loading…
Reference in a new issue