Skip to content

Commit 31cd229

Browse files
Added locked property to BaseSoundManager class
1 parent 94cefc9 commit 31cd229

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/sound/BaseSoundManager.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ var BaseSoundManager = new Class({
9898
* @default 0
9999
*/
100100
this._detune = 0;
101+
/**
102+
* Mobile devices require sounds to be triggered from an explicit user action,
103+
* such as a tap, before any sound can be loaded/played on a web page.
104+
* Set to true if the audio system is currently locked awaiting user interaction.
105+
*
106+
* @readonly
107+
* @property {boolean} locked
108+
* @default false
109+
*/
110+
this.locked = false;
101111
this.unlock();
102112
},
103113
/**

0 commit comments

Comments
 (0)