Skip to content

Commit

Permalink
on FF 3.6 with no flash, onLoad event is not triggered
Browse files Browse the repository at this point in the history
code to reproduce the error:
                    soundManager.createSound({
                        id: 'mysound',
                        url: '/sounds/mysound.ogg',
                        autoLoad: true,
                        autoPlay: true,
                        onload: function(){
                           alert('loaded');
                                }
                    });
adding s._a.load(); on line 2937, triggers the onload event.
  • Loading branch information
jgabios committed Oct 8, 2013
1 parent 519e65f commit a998e44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script/soundmanager2.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2934,6 +2934,7 @@ function SoundManager(smURL, smID) {
if (instanceOptions.autoLoad || instanceOptions.autoPlay) { if (instanceOptions.autoLoad || instanceOptions.autoPlay) {


s._a = new Audio(instanceOptions.url); s._a = new Audio(instanceOptions.url);
s._a.load();


} else { } else {


Expand Down Expand Up @@ -5938,4 +5939,4 @@ if (window.SM2_DEFER === undefined || !SM2_DEFER) {
window.SoundManager = SoundManager; // constructor window.SoundManager = SoundManager; // constructor
window.soundManager = soundManager; // public API, flash callbacks etc. window.soundManager = soundManager; // public API, flash callbacks etc.


}(window)); }(window));

1 comment on commit a998e44

@scottschiller
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been merged and is now on SM2 master - thanks!
V2.97a.20130512...V2.97a.20131201

Please sign in to comment.