Added ability for full Audio tag playback and iOS touch lock load support.

This commit is contained in:
Richard Davey
2013-07-16 23:32:47 +01:00
parent 72eb22128f
commit a2c756e37f
11 changed files with 620 additions and 215 deletions
+13
View File
@@ -4439,6 +4439,9 @@ module Phaser {
* @param data {object} Extra sound data.
*/
public addSound(key: string, url: string, data, webAudio?: bool, audioTag?: bool): void;
public reloadSound(key: string): void;
public onSoundUnlock: Signal;
public reloadSoundComplete(key: string): void;
public updateSound(key: string, property: string, value): void;
/**
* Add a new decoded sound.
@@ -4490,6 +4493,12 @@ module Phaser {
*/
public isSoundDecoded(key: string): bool;
/**
* Check whether an asset is decoded sound.
* @param key Asset key of the sound you want.
* @return {object} The sound data you want.
*/
public isSoundReady(key: string): bool;
/**
* Check whether an asset is sprite sheet.
* @param key Asset key of the sprite sheet you want.
* @return {object} The sprite sheet data you want.
@@ -6951,6 +6960,7 @@ module Phaser {
* @param [loop] {boolean} loop this sound when playing? (Default to false)
*/
constructor(game: Game, key: string, volume?: number, loop?: bool);
private soundHasUnlocked(key);
/**
* Local reference to the current Phaser.Game.
*/
@@ -7088,6 +7098,9 @@ module Phaser {
* The global audio volume. A value between 0 (silence) and 1 (full volume)
*/
public volume : number;
public stopAll(): void;
public pauseAll(): void;
public resumeAll(): void;
/**
* Decode a sound with its assets key.
* @param key {string} Assets key of the sound to be decoded.