Skip to content

Commit d367dc1

Browse files
Renamed 'marker' param of play method to 'markerName' to avoid any confusion for BaseSound
1 parent 8e912ab commit d367dc1

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

v3/src/sound/BaseSound.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,26 +143,26 @@ var BaseSound = new Class({
143143
removeMarker: function (markerName) {
144144
return false;
145145
},
146-
play: function (marker, config) {
147-
if (marker === void 0) { marker = ''; }
148-
if (typeof marker === 'object') {
149-
config = marker;
150-
marker = '';
146+
play: function (markerName, config) {
147+
if (markerName === void 0) { markerName = ''; }
148+
if (typeof markerName === 'object') {
149+
config = markerName;
150+
markerName = '';
151151
}
152-
if (typeof marker !== 'string') {
152+
if (typeof markerName !== 'string') {
153153
console.error('Sound marker name has to be a string!');
154154
return null;
155155
}
156-
if (!marker) {
156+
if (!markerName) {
157157
this.currentConfig = this.config;
158158
this.duration = this.totalDuration;
159159
}
160160
else {
161-
if (!this.markers[marker]) {
162-
console.error('No marker with name \'' + marker + '\' found for sound \'' + this.key + '\'!');
161+
if (!this.markers[markerName]) {
162+
console.error('No marker with name \'' + markerName + '\' found for sound \'' + this.key + '\'!');
163163
return null;
164164
}
165-
this.currentMarker = this.markers[marker];
165+
this.currentMarker = this.markers[markerName];
166166
this.currentConfig = this.currentMarker.config;
167167
this.duration = this.currentMarker.duration;
168168
}

0 commit comments

Comments
 (0)