SoundManager 2 doesn't load in Google Chrome.
SoundManager 2 doesn't appear to be loading in Google Chrome 2.0.170.0. Flash detection is good...here is debug:
SMSound._onload(): "sm2TestSound" loaded.
soundManager.onload() complete
soundManager.initComplete(): calling soundManager.onload()
soundManager.load(): http://schillmania.com/projects/sound...
SMSound.play(): Attempting to load "sm2TestSound"
SMSound() merged options: { id: sm2TestSound, url: http://schillmania.com/projects/sound..., autoLoad: false, stream: true, autoPlay: false, onbeforefinishtime: 5000, onjustbeforefinishtime: 200, multiShot: true, pan: 0, volume: 100 }
soundManager.createSound(): sm2TestSound (http://schillmania.com/projects/sound...)
-- SoundManager 2 loaded (OK) --
(Flash): Enabling polling
Flash security sandbox type: remote
(Flash): _externalInterfaceTest(): JS to/from Flash OK
Attempting to call Flash from JS..
-- soundManager.init() --
soundManager._externalInterfaceOK()
(Flash): Flash to JS OK
soundManager._initMovie(): Waiting for ExternalInterface call from Flash..
soundManager._initMovie(): Got EMBED element (created via JS)
soundManager._createMovie(): Trying to load ../../swf/soundmanager2.swf
-- SoundManager 2 V2.94a.20090206 (AS2/Flash 8) --
soundManager.domContentLoaded()
SMSound._onload(): "sm2TestSound" loaded.
soundManager.onload() complete
soundManager.initComplete(): calling soundManager.onload()
soundManager.load(): http://schillmania.com/projects/sound...
SMSound.play(): Attempting to load "sm2TestSound"
SMSound() merged options: { id: sm2TestSound, url: http://schillmania.com/projects/sound..., autoLoad: false, stream: true, autoPlay: false, onbeforefinishtime: 5000, onjustbeforefinishtime: 200, multiShot: true, pan: 0, volume: 100 }
soundManager.createSound(): sm2TestSound (http://schillmania.com/projects/sound...)
-- SoundManager 2 loaded (OK) --
(Flash): Enabling polling
Flash security sandbox type: remote
(Flash): _externalInterfaceTest(): JS to/from Flash OK
Attempting to call Flash from JS..
-- soundManager.init() --
soundManager._externalInterfaceOK()
(Flash): Flash to JS OK
soundManager._initMovie(): Waiting for ExternalInterface call from Flash..
soundManager._initMovie(): Got EMBED element (created via JS)
soundManager._createMovie(): Trying to load ../../swf/soundmanager2.swf
-- SoundManager 2 V2.94a.20090206 (AS2/Flash 8) --
soundManager.domContentLoaded()
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Interesting. I just grabbed Chrome 2.0.170.0 and the SM2 front page looks to work OK, but the API demo page fails with a SM2 load timeout. It might be related to the layout of the page, something positioning or display-related, preventing the SWF from calling out to the page.
(Edit) OK, bizarrely, reloading the page a few times seemed to get things working. Maybe this browser has a few JS/DOM bugs, or something. I'll do some digging and will follow up if I find anything worthwhile. -
Inappropriate?I'm seeing the same problem with 2.0.172.33... Have you had a chance to look into this?
-
Inappropriate?Testing with 2.0.172.33, I saw a load/timeout error only once when hitting "back" from a demo to land on /projects/soundmanager2/ (the home page), and haven't been able to reproduce it since.
If you reload a number of times, do you see an error here?
http://www.schillmania.com/projects/s...
I’m hmm.
-
This seems to happen the first time I visit a page, and then reloads don't seem to have much effect. The homepage didn't fail, but then the API page complained. However, calling soundManager.reboot() manually from the JS console got things up and running. It could be a bit hackish, but it might be worthwhile trying to gracefully fail, reboot and wait forever for a response from flash. -
Inappropriate?This sounds like a state/timing issue, where for reasons unknown SM2 fails when trying to start the first time (writes .SWF to DOM, waits for SWF to load and say "hi", etc.)
A possible workaround is to attempt to "reboot" SM2 (try the init/load process all over again) if an initial error occurs, and wait indefinitely for a response from Flash - that is, it never times out/gets "impatient" waiting for a response from Flash, and will not fire soundManager.onerror() again.
Thus:
soundManager.onload = function() {
// yay! things worked..
// your code here.. sound is good to go.
}
soundManager.onerror = function() {
// time-out, no flash, weird Chrome load issue perhaps.. is user using Chrome?
// let's try re-starting and see if it works. If not, no loss.
soundManager.flashLoadTimeout = 0; // wait forever for flash this time..
setTimeout(soundManager.reboot,20); // and restart SM2 init process
setTimeout(function() {
// after 1.5 seconds..
if (!soundManager.supported()) {
// No luck, no sound - give up, etc.
}
},1500);
}
I typed this out without actually testing, but it should work with minimal edits if I did make any mistakes. :D
This way, SM2 will restart and wait indefinitely for Flash to load. If it doesn't work, the timeout will ultimately fire and if soundManager.supported() returns false at that point, then it's time to give up (eg. no sound after a reboot.)
I am a bit hesitant about making this a default behaviour for SM2, but if the Chrome issue proves to be persistent enough and I can't isolate the cause of the problem, then it may be worth doing special-case for this browser.
It may be that I have to wait for window.onload() or otherwise be conservative about writing the flash out to the document - I haven't investigated this yet, but again it's hard to test because the issue seems to be sporadic and can't be reliably reproduced.
I’m argh
Loading Profile...



EMPLOYEE
