Skip to content
Browse files

Fixed initial mute state

Also addressed early preload issues.
  • Loading branch information...
1 parent ab56047 commit c2e79a348924b937fe0d93952e012cf7d66cd9a8 @lannymcnie lannymcnie committed Sep 2, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/soundjs/FlashPlugin.js
View
6 src/soundjs/FlashPlugin.js
@@ -323,6 +323,7 @@ this.createjs = this.createjs||{};
*/
uniqueId: -1,
+ owner: null,
capabilities: null,
flash: null,
flashId: null, // To communicate with Flash
@@ -424,6 +425,7 @@ this.createjs = this.createjs||{};
this.cleanUp();
return false;
}
+ if (this.muted) { this.mute(true); }
this.playState = createjs.SoundJS.PLAY_SUCCEEDED;
this.owner.registerSoundInstance(this.flashId, this);
return true;
@@ -577,6 +579,7 @@ this.createjs = this.createjs||{};
progress: -1,
readyState: 0,
loading: false,
+ owner: null,
// Calbacks
/**
@@ -622,12 +625,11 @@ this.createjs = this.createjs||{};
*/
load: function(src) {
if (src != null) { this.src = src; }
- if (this.flash == null) {
+ if (this.flash == null || !this.owner.flashReady) {
loading = true;
return false;
}
- //LM: Consider checking the result of the preload call.
this.flashId = this.flash.preload(this.src);
// Associate this preload instance with the FlashID, so callbacks can route here.
this.owner.registerPreloadInstance(this.flashId, this);

0 comments on commit c2e79a3

Please sign in to comment.
Something went wrong with that request. Please try again.