Renamed locked action name property to prop

This commit is contained in:
Pavle Goloskokovic 2018-01-17 19:16:21 +01:00
parent 252b577ab4
commit 6be1406b8b

View file

@ -107,11 +107,11 @@ var HTML5AudioSoundManager = new Class({
};
this.once('unlocked', function () {
_this.lockedActionsQueue.forEach(function (lockedAction) {
if (lockedAction.sound[lockedAction.name].apply) {
lockedAction.sound[lockedAction.name].apply(lockedAction.sound, lockedAction.value || []);
if (lockedAction.sound[lockedAction.prop].apply) {
lockedAction.sound[lockedAction.prop].apply(lockedAction.sound, lockedAction.value || []);
}
else {
lockedAction.sound[lockedAction.name] = lockedAction.value;
lockedAction.sound[lockedAction.prop] = lockedAction.value;
}
});
_this.lockedActionsQueue.length = 0;
@ -138,11 +138,11 @@ var HTML5AudioSoundManager = new Class({
this.onBlurPausedSounds.length = 0;
this.onBlurPausedSounds = null;
},
isLocked: function (sound, name, value) {
isLocked: function (sound, prop, value) {
if (this.locked) {
this.lockedActionsQueue.push({
sound: sound,
name: name,
prop: prop,
value: value
});
return true;