Sometimes no sound but never an error either - firefox
Using FF 3.0.5, Flash 10.x (latest), and current SM2.
Sometimes (almost random) when I navigate to my home page, where I have a welcome sound, the sound doens't get played. onerror is not getting triggered (I have an alert in it). Navigating from page links, using the address bar, and from bookmarks. Sometimes the sound plays sometimes it doesn't. I'm using jquery to wait for the DOM to be ready before trying to play the sound.
Tried this in the other four major browsers (Opera, Safari, IE7, and Chrome) and all play the sound without fail. Is there some odd thing with FF and flash now?
Sometimes (almost random) when I navigate to my home page, where I have a welcome sound, the sound doens't get played. onerror is not getting triggered (I have an alert in it). Navigating from page links, using the address bar, and from bookmarks. Sometimes the sound plays sometimes it doesn't. I'm using jquery to wait for the DOM to be ready before trying to play the sound.
Tried this in the other four major browsers (Opera, Safari, IE7, and Chrome) and all play the sound without fail. Is there some odd thing with FF and flash now?
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?Make sure you are waiting for soundManager.onload() has fired before trying to create or play sounds.
soundManager.onload() is separate from "DOM Ready" and window load()-related events, because the load/init process is asynchronous due to the requirement to load a SWF. (Basically, SM2 has to wait for the DOM to be ready, inject the .SWF via createElement() or writing to innerHTML, and then wait for a callback from Flash before it gives the "OK".) As a result, SM2 is on its own "timeline" and thus is independent of DOM/window.load events.
SM2 does not start loading the SWF until the browser's "DOM Ready" event fires, and in some cases SM2 may not even be ready until some time after window.onload() fires (typically only for Internet Explorer.)
Some more info on this is on the SM2 page, How SoundManager 2 Works.
A typical implementation might have code inside <head> for example, inline or in an external javascript file:
// this case will fail - SM2 is not ready yet
soundManager.play('foo','/path/to/sound.mp3');
// this is the event called by SM2 when it has loaded successfully
soundManager.onload = function() {
// OK, now ready to go
soundManager.play(...); // etc.
}
I’m it's complicated!
-
Inappropriate?I made a few adjustments and that fixed a page transition issue with Opera and loading SM2 and always producing an error. All of my sound code is located within sm.onload() but it still doesn't play the sounds sometimes. All events still get triggered though - like onfinish and such. Very odd. I'll capture the debug log output and post in another msg.
I’m confused
-
This -might- be related to the way Opera doesn't fully unload/reload pages when navigating between them, a guess. I think if you assign an event to the window unload event, Opera will see this and will force a full page unload/reload as normal browsers do.
Loading Profile...



EMPLOYEE