From d367dc1a8567721646400227a0aa53f222df09d5 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Wed, 22 Nov 2017 18:05:18 +0100 Subject: [PATCH] Renamed 'marker' param of play method to 'markerName' to avoid any confusion for BaseSound --- v3/src/sound/BaseSound.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/v3/src/sound/BaseSound.js b/v3/src/sound/BaseSound.js index 8cc223e9c..9df8f05e8 100644 --- a/v3/src/sound/BaseSound.js +++ b/v3/src/sound/BaseSound.js @@ -143,26 +143,26 @@ var BaseSound = new Class({ removeMarker: function (markerName) { return false; }, - play: function (marker, config) { - if (marker === void 0) { marker = ''; } - if (typeof marker === 'object') { - config = marker; - marker = ''; + play: function (markerName, config) { + if (markerName === void 0) { markerName = ''; } + if (typeof markerName === 'object') { + config = markerName; + markerName = ''; } - if (typeof marker !== 'string') { + if (typeof markerName !== 'string') { console.error('Sound marker name has to be a string!'); return null; } - if (!marker) { + if (!markerName) { this.currentConfig = this.config; this.duration = this.totalDuration; } else { - if (!this.markers[marker]) { - console.error('No marker with name \'' + marker + '\' found for sound \'' + this.key + '\'!'); + if (!this.markers[markerName]) { + console.error('No marker with name \'' + markerName + '\' found for sound \'' + this.key + '\'!'); return null; } - this.currentMarker = this.markers[marker]; + this.currentMarker = this.markers[markerName]; this.currentConfig = this.currentMarker.config; this.duration = this.currentMarker.duration; }