mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Setting locked lag only if there are locked audio tags
This commit is contained in:
parent
eec19e146a
commit
116e62fafe
1 changed files with 18 additions and 3 deletions
|
@ -154,15 +154,30 @@ var HTML5AudioSoundManager = new Class({
|
|||
*/
|
||||
unlock: function ()
|
||||
{
|
||||
this.locked = 'ontouchstart' in window;
|
||||
this.locked = false;
|
||||
|
||||
var _this = this;
|
||||
|
||||
this.game.cache.audio.entries.each(function (key, tags)
|
||||
{
|
||||
for (var i = 0; i < tags.length; i++)
|
||||
{
|
||||
if (tags[i].dataset.locked === 'true')
|
||||
{
|
||||
_this.locked = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
if(!this.locked)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var _this = this;
|
||||
|
||||
var moved = false;
|
||||
|
||||
var detectMove = function ()
|
||||
|
|
Loading…
Reference in a new issue