addTouchLockCallback(callback, context, onEnd)
Adds a callback that is fired when a browser touchstart or touchend event is received.
This is used internally to handle audio and video unlocking on mobile devices.
If the callback returns 'true' then the callback is automatically deleted once invoked.
The callback is added to the Phaser.Touch.touchLockCallbacks array and should be removed with Phaser.Touch.removeTouchLockCallback.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
callback | function | The callback that will be called when a touchstart event is received. | ||
context | object | The context in which the callback will be called. | ||
onEnd | boolean | <optional> | false | Will the callback fire on a touchstart (default) or touchend event? |
- Source code: input/Touch.js (Line 200)
Please login to continue.