Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed mute in HTML5 mode

Also removed trailing whitespace
  • Loading branch information...
commit 9637326a3e9f68c0a3004fce818e350a46acadd1 1 parent 5cb0bdd
@Shraymonks Shraymonks authored
Showing with 12 additions and 8 deletions.
  1. +12 −8 script/soundmanager2.js
View
20 script/soundmanager2.js
@@ -2047,7 +2047,7 @@ function SoundManager(smURL, smID) {
}
// playing multiple muted sounds? if you do this, you're weird ;) - but let's cover it.
- if (s._iO.muted) {
+ if (s.muted) {
audioClone.muted = true;
}
@@ -2437,6 +2437,10 @@ function SoundManager(smURL, smID) {
if (!s.isHTML5) {
flash._setVolume(s.id, (sm2.muted && !s.muted) || s.muted?0:nVol);
} else if (s._a) {
+ if (sm2.muted && !s.muted) {
+ s.muted = true;
+ s._a.muted = true;
+ }
// valid range: 0-1
s._a.volume = Math.max(0, Math.min(1, nVol/100));
}
@@ -2674,7 +2678,7 @@ function SoundManager(smURL, smID) {
for (item in op) {
if (op.hasOwnProperty(item)) {
- s.onPosition(parseInt(item, 10), op[item]);
+ s.onPosition(parseInt(item, 10), op[item]);
}
}
@@ -3283,7 +3287,7 @@ function SoundManager(smURL, smID) {
/**
* internal: flash 9 + NetStream (MovieStar/RTMP-only) feature
- *
+ *
* @param {object} oData
*/
@@ -3302,7 +3306,7 @@ function SoundManager(smURL, smID) {
/**
* internal: flash 9 + NetStream (MovieStar/RTMP-only) feature
* RTMP may include song title, MovieStar content may include encoding info
- *
+ *
* @param {array} oMDProps (names)
* @param {array} oMDData (values)
*/
@@ -3327,7 +3331,7 @@ function SoundManager(smURL, smID) {
/**
* internal: flash 8 + flash 9 ID3 feature
* may include artist, song title etc.
- *
+ *
* @param {array} oID3Props (names)
* @param {array} oID3Data (values)
*/
@@ -4897,7 +4901,7 @@ function SoundManager(smURL, smID) {
if (h5IntervalTimer === null && h5TimerCount === 0) {
h5IntervalTimer = setInterval(timerExecute, sm2.html5PollingInterval);
-
+
}
h5TimerCount++;
@@ -5815,7 +5819,7 @@ function SoundManager(smURL, smID) {
var a = 'sm2-usehtml5audio=',
a2 = 'sm2-preferflash=',
- b = null,
+ b = null,
b2 = null,
l = wl.toLowerCase();
@@ -5970,4 +5974,4 @@ if (window.SM2_DEFER === undefined || !SM2_DEFER) {
window.SoundManager = SoundManager; // constructor
window.soundManager = soundManager; // public API, flash callbacks etc.
-}(window));
+}(window));

1 comment on commit 9637326

@scottschiller

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

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