Skip to content

Commit c37acdf

Browse files
Added play method docs
1 parent c89cfcd commit c37acdf

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

v3/src/sound/BaseSound.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,16 @@ var BaseSound = new Class({
240240
this.markers[markerName] = null;
241241
return marker;
242242
},
243+
/**
244+
* Play this sound, or a marked section of it.
245+
* It always plays the sound from the start. If you want to start playback from a specific time
246+
* you can set 'seek' setting of the config object, provided to this call, to that value.
247+
*
248+
* @method Phaser.Sound.BaseSound#play
249+
* @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.
250+
* @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.
251+
* @returns {ISound} This sound instance.
252+
*/
243253
play: function (markerName, config) {
244254
if (markerName === void 0) { markerName = ''; }
245255
if (typeof markerName === 'object') {

0 commit comments

Comments
 (0)