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