Skip to content

Commit 7384d9a

Browse files
Defining audioPlayDelay property for HTML5AudioSoundManager class
1 parent 2d20759 commit 7384d9a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/sound/html5/HTML5AudioSoundManager.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ var HTML5AudioSoundManager = new Class({
1515
* @default true
1616
*/
1717
this.override = true;
18+
/**
19+
* Value representing time difference in seconds between calling
20+
* play method on an audio tag and when it actually starts playing.
21+
* It is used to achieve more accurate delayed sound playback.
22+
*
23+
* You might need to tweak this value to get the desired results
24+
* since audio play delay varies depending on the browser/platform.
25+
*
26+
* @property {number} audioPlayDelay
27+
* @default 0.1
28+
*/
29+
this.audioPlayDelay = 0.1;
1830
/**
1931
* An array for keeping track of all the sounds
2032
* that were paused when game lost focus.

0 commit comments

Comments
 (0)