Merging provided marker with object with default values

This commit is contained in:
Pavle Goloskokovic 2017-11-23 12:33:56 +01:00
parent 6e8109d812
commit 2bcffe6f2f

View file

@ -142,6 +142,20 @@ var BaseSound = new Class({
console.error('Marker object has to be provided to \'addMarker\' method!');
return false;
}
marker = Extend(true, {
name: '',
start: 0,
duration: this.totalDuration,
config: {
mute: false,
volume: 1,
rate: 1,
detune: 0,
seek: 0,
loop: false,
pan: 0
}
}, marker);
this.markers[marker.name] = marker;
return false;
},