deku-soundplayer
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -14,4 +14,14 @@ // handling multiple audio on the page helpers | ||
function each(arr, cb) { | ||
if (arr) { | ||
for (var i = 0, len = arr.length; i < len; i++) { | ||
if (arr[i] && cb(arr[i], i, arr)) { | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
function stopAllOther(playing) { | ||
_playedAudios.forEach(function (soundCloudAudio) { | ||
each(_playedAudios, function (soundCloudAudio) { | ||
if (soundCloudAudio.playing && soundCloudAudio.playing !== playing) { | ||
@@ -26,9 +36,8 @@ soundCloudAudio.stop(); | ||
for (var i = 0, len = _playedAudios.length; i < len; i++) { | ||
var _soundCloudAudio = _playedAudios[i]; | ||
each(_playedAudios, function (_soundCloudAudio) { | ||
if (_soundCloudAudio.playing === soundCloudAudio.playing) { | ||
isPresent = true; | ||
break; | ||
return true; | ||
} | ||
} | ||
}); | ||
@@ -35,0 +44,0 @@ if (!isPresent) { |
{ | ||
"name": "deku-soundplayer", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Create custom SoundCloud players with Deku", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
22462
521