Class Sound

Index

Properties

Methods

Properties

public static EXTENSION_MAP: Object

public static INTERRUPT_ANY: string

public static INTERRUPT_EARLY: string

public static INTERRUPT_LATE: string

public static INTERRUPT_NONE: string

public static PLAY_FAILED: string

public static PLAY_FINISHED: string

public static PLAY_INITED: string

public static PLAY_INTERRUPTED: string

public static PLAY_SUCCEEDED: string

public static SUPPORTED_EXTENSIONS: Array<string>

public static activePlugin: Object

public static alternateExtensions: Array<any>

public static defaultInterruptBehavior: string

Methods

public static addEventListener(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean): Function

Parameters

  • type: string
  • listener: (eventObj: Object) => boolean
  • useCapture?: boolean optional

Returns

Function

public static addEventListener(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): Function

Parameters

  • type: string
  • listener: (eventObj: Object) => void
  • useCapture?: boolean optional

Returns

Function

public static addEventListener(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, useCapture?: boolean): Object

Parameters

  • type: string
  • listener: { handleEvent: (eventObj: Object) => boolean; }
  • useCapture?: boolean optional

Returns

Object

public static addEventListener(type: string, listener: { handleEvent: (eventObj: Object) => void; }, useCapture?: boolean): Object

Parameters

  • type: string
  • listener: { handleEvent: (eventObj: Object) => void; }
  • useCapture?: boolean optional

Returns

Object

public static createInstance(src: string): SoundInstance

Parameters

  • src: string

Returns

SoundInstance

public static dispatchEvent(eventObj: Object, target?: Object): boolean

Parameters

  • eventObj: Object
  • target?: Object optional

Returns

boolean

public static dispatchEvent(eventObj: string, target?: Object): boolean

Parameters

  • eventObj: string
  • target?: Object optional

Returns

boolean

public static dispatchEvent(eventObj: createjs.Event, target?: Object): boolean

Parameters

  • eventObj: createjs.Event
  • target?: Object optional

Returns

boolean

public static getCapabilities(): Object

Returns

Object

public static getCapability(key: string): any

Parameters

  • key: string

Returns

any

public static getMute(): boolean

Returns

boolean

public static getVolume(): number

Returns

number

public static hasEventListener(type: string): boolean

Parameters

  • type: string

Returns

boolean

public static initializeDefaultPlugins(): boolean

Returns

boolean

public static isReady(): boolean

Returns

boolean

public static loadComplete(src: string): boolean

Parameters

  • src: string

Returns

boolean

public static off(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean)

Parameters

  • type: string
  • listener: (eventObj: Object) => boolean
  • useCapture?: boolean optional

public static off(type: string, listener: (eventObj: Object) => void, useCapture?: boolean)

Parameters

  • type: string
  • listener: (eventObj: Object) => void
  • useCapture?: boolean optional

public static off(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, useCapture?: boolean)

Parameters

  • type: string
  • listener: { handleEvent: (eventObj: Object) => boolean; }
  • useCapture?: boolean optional

public static off(type: string, listener: { handleEvent: (eventObj: Object) => void; }, useCapture?: boolean)

Parameters

  • type: string
  • listener: { handleEvent: (eventObj: Object) => void; }
  • useCapture?: boolean optional

public static off(type: string, listener: Function, useCapture?: boolean)

Parameters

  • type: string
  • listener: Function
  • useCapture?: boolean optional

public static on(type: string, listener: (eventObj: Object) => boolean, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function

Parameters

  • type: string
  • listener: (eventObj: Object) => boolean
  • scope?: Object optional
  • once?: boolean optional
  • data?: any optional
  • useCapture?: boolean optional

Returns

Function

public static on(type: string, listener: (eventObj: Object) => void, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function

Parameters

  • type: string
  • listener: (eventObj: Object) => void
  • scope?: Object optional
  • once?: boolean optional
  • data?: any optional
  • useCapture?: boolean optional

Returns

Function

public static on(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Object

Parameters

  • type: string
  • listener: { handleEvent: (eventObj: Object) => boolean; }
  • scope?: Object optional
  • once?: boolean optional
  • data?: any optional
  • useCapture?: boolean optional

Returns

Object

public static on(type: string, listener: { handleEvent: (eventObj: Object) => void; }, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Object

Parameters

  • type: string
  • listener: { handleEvent: (eventObj: Object) => void; }
  • scope?: Object optional
  • once?: boolean optional
  • data?: any optional
  • useCapture?: boolean optional

Returns

Object

public static play(src: string, interrupt?: any, delay?: number, offset?: number, loop?: number, volume?: number, pan?: number): SoundInstance

Parameters

  • src: string
  • interrupt?: any optional
  • delay?: number optional
  • offset?: number optional
  • loop?: number optional
  • volume?: number optional
  • pan?: number optional

Returns

SoundInstance

public static registerManifest(manifest: Array<any>, basePath: string): Object

Parameters

  • manifest: Array<any>
  • basePath: string

Returns

Object

public static registerPlugins(plugins: Array<any>): boolean

Parameters

  • plugins: Array<any>

Returns

boolean

public static registerSound(src: string, id?: string, data?: number, preload?: boolean, basePath?: string): Object

Parameters

  • src: string
  • id?: string optional
  • data?: number optional
  • preload?: boolean optional
  • basePath?: string optional

Returns

Object

public static registerSound(src: string, id?: string, data?: Object, preload?: boolean, basePath?: string): Object

Parameters

  • src: string
  • id?: string optional
  • data?: Object optional
  • preload?: boolean optional
  • basePath?: string optional

Returns

Object

public static registerSound(src: Object, id?: string, data?: number, preload?: boolean, basePath?: string): Object

Parameters

  • src: Object
  • id?: string optional
  • data?: number optional
  • preload?: boolean optional
  • basePath?: string optional

Returns

Object

public static registerSound(src: Object, id?: string, data?: Object, preload?: boolean, basePath?: string): Object

Parameters

  • src: Object
  • id?: string optional
  • data?: Object optional
  • preload?: boolean optional
  • basePath?: string optional

Returns

Object

public static removeAllEventListeners(type?: string)

Parameters

  • type?: string optional

public static removeAllSounds()

public static removeEventListener(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean)

Parameters

  • type: string
  • listener: (eventObj: Object) => boolean
  • useCapture?: boolean optional

public static removeEventListener(type: string, listener: (eventObj: Object) => void, useCapture?: boolean)

Parameters

  • type: string
  • listener: (eventObj: Object) => void
  • useCapture?: boolean optional

public static removeEventListener(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, useCapture?: boolean)

Parameters

  • type: string
  • listener: { handleEvent: (eventObj: Object) => boolean; }
  • useCapture?: boolean optional

public static removeEventListener(type: string, listener: { handleEvent: (eventObj: Object) => void; }, useCapture?: boolean)

Parameters

  • type: string
  • listener: { handleEvent: (eventObj: Object) => void; }
  • useCapture?: boolean optional

public static removeEventListener(type: string, listener: Function, useCapture?: boolean)

Parameters

  • type: string
  • listener: Function
  • useCapture?: boolean optional

public static removeManifest(manifest: Array<any>, basePath: string): Object

Parameters

  • manifest: Array<any>
  • basePath: string

Returns

Object

public static removeSound(src: string, basePath: string): boolean

Parameters

  • src: string
  • basePath: string

Returns

boolean

public static removeSound(src: Object, basePath: string): boolean

Parameters

  • src: Object
  • basePath: string

Returns

boolean

public static setMute(value: boolean): boolean

Parameters

  • value: boolean

Returns

boolean

public static setVolume(value: number)

Parameters

  • value: number

public static stop()

public static toString(): string

Returns

string

public static willTrigger(type: string): boolean

Parameters

  • type: string

Returns

boolean