Overview of SoundJS core classes
masterSoundJS provides a consistent API for web audio through several key classes:
createjs.Sound: The core API for playing sounds. Usecreatejs.Sound.play(sound, ...options)to create a sound instance.createjs.SoundInstance: A controllable object returned by playing a sound. It wraps the underlying plugin and allows you to pause, mute, stop, or change volume, pan, and position.- Plugins: SoundJS uses a plugin model to support different environments:
WebAudioPlugin: The default plugin using Web Audio APIs. Note: WebAudio may fail when running files locally, triggering the fallback.HTMLAudioPlugin: The built-in fallback that uses the HTML5<audio>tag.CordovaAudioPlugin: For Cordova, PhoneGap, or Ionic apps. Requires manual registration.FlashAudioPlugin: Uses a Flash shim and SWFObject. Requires manual setup and registration.