Skip to content

Commit ff6f7f8

Browse files
Initializing config property to object with default config values merged with provided config attribute
1 parent f925d3f commit ff6f7f8

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/sound/noaudio/NoAudioSound.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var Class = require('../../utils/Class');
22
var EventEmitter = require('eventemitter3');
3+
var Extend = require('../utils/object/Extend');
34
var NoAudioSound = new Class({
45
Extends: EventEmitter,
56
initialize: function NoAudioSound(manager, key, config) {
@@ -11,6 +12,15 @@ var NoAudioSound = new Class({
1112
this.totalRate = 1;
1213
this.duration = 0;
1314
this.totalDuration = 0;
15+
this.config = Extend({
16+
mute: false,
17+
volume: 1,
18+
rate: 1,
19+
detune: 0,
20+
seek: 0,
21+
loop: false,
22+
delay: 0
23+
}, config);
1424
}
1525
});
1626
module.exports = NoAudioSound;

0 commit comments

Comments
 (0)