You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/sound/BaseSound.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -260,7 +260,7 @@ var BaseSound = new Class({
260
260
* @method Phaser.Sound.BaseSound#play
261
261
* @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.
262
262
* @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.
263
-
* @returns {ISound | null} This sound instance or 'null' if an error occurred.
263
+
* @returns {boolean} Whether the sound started playing successfully.
264
264
*/
265
265
play: function(markerName,config){
266
266
if(markerName===void0){markerName='';}
@@ -270,7 +270,7 @@ var BaseSound = new Class({
270
270
}
271
271
if(typeofmarkerName!=='string'){
272
272
console.error('Sound marker name has to be a string!');
273
-
returnnull;
273
+
returnfalse;
274
274
}
275
275
if(!markerName){
276
276
this.currentMarker=null;
@@ -280,7 +280,7 @@ var BaseSound = new Class({
280
280
else{
281
281
if(!this.markers[markerName]){
282
282
console.error('No marker with name \''+markerName+'\' found for sound \''+this.key+'\'!');
0 commit comments