• Stars
    star
    4,384
  • Rank 9,783 (Top 0.2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 13 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Javascript library for working with Audio. It provides a consistent API for loading and playing audio on different browsers and devices. Currently supports WebAudio, HTML5 Audio, Cordova / PhoneGap, and a Flash fallback.

SoundJS

SoundJS is a library to make working with audio on the web easier. It provides a consistent API for playing audio in different browsers, including using a target plugin model to provide an easy way to provide additional audio plugins like a Flash fallback (included, but must be used separately from the combined/minified version).

A mechanism has been provided for easily tying in audio preloading to PreloadJS.

Example

createjs.Sound.on("fileload", handleLoadComplete);
createjs.Sound.alternateExtensions = ["mp3"];
createjs.Sound.registerSound({src:"path/to/sound.ogg", id:"sound"});
function handleLoadComplete(event) {
	createjs.Sound.play("sound");
}

License

Built by gskinner.com, and released for free under the MIT license, which means you can use it for almost any purpose (including commercial projects). We appreciate credit where possible, but it is not a requirement.

Support and Resources

Classes

The core API for playing sounds. Call createjs.Sound.play(sound, ...options), and a sound instance is created that can be used to control the audio, and dispatches events when it is complete, loops, or is interrupted.

A controllable sound object that wraps the actual plugin implementation, providing a consistent API for audio playback, no matter what happens in the background. Sound instances can be paused, muted, and stopped; and the volume, pan (where available), and position changed using the simple API.

The default, built-in plugin, which uses Web Audio APIs to playback sounds. Note that WebAudio will fail to load when run locally, and the HTML audio plugin will be used instead.

The fallback built-in plugin, which manages audio playback via the HTML5 tag. This will be used in instances where the WebAudio plugin is not available.

An additional plugin which will playback audio in a Cordova app and tools that utilize Cordova such as PhoneGap or Ionic. You must manually register this plugin. Currently available on github since SoundJS-0.6.1.

An additional plugin which uses a flash shim (and SWFObject) to playback audio using Flash. You must manually set up and register this plugin.

Have a look at the included examples and API documentation for more in-depth information.

More Repositories

1

EaselJS

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
JavaScript
8,073
star
2

TweenJS

A simple but powerful tweening / animation library for Javascript. Part of the CreateJS suite of libraries.
JavaScript
3,505
star
3

PreloadJS

PreloadJS makes preloading assets & getting aggregate progress events easier in JavaScript. It uses XHR2 when available, and falls back to tag-based loading when not.
JavaScript
2,855
star
4

Zoe

Zoë is an open source tool for generating spritesheet images and frame data from SWF files. It enables illustrators to maintain a familiar workflow while generating animations for EaselJS and other formats.
ActionScript
328
star
5

CreateJS

Repo for combined CreateJS library. Mainly for CDNs.
227
star
6

EaselJSRenderers

Runtime pluggable renderers for EaselJS (Canvas 2D, WebGL, HTML DOM, SVG).
JavaScript
165
star
7

sandbox

Contains demos, helper classes, experiments, and other resources that don't belong in the main repos.
JavaScript
150
star
8

Combined

Hosts the combined CreateJS library, and the tools for building it.
JavaScript
120
star
9

AdobeAnimateDemo

Mini game with visual assets created in Adobe Animate CC
JavaScript
103
star
10

EaselJS-NodeJS

A NodeJS compatible build of EaselJS.
89
star
11

html5ads

An in-depth white paper on building HTML5 advertising with CreateJS and Flash Pro. Includes supporting materials, sample banner ad, and helper classes.
JavaScript
72
star
12

localization

Repo for collaborative creation of localized documentation.
JavaScript
47
star
13

core

Core code shared by two or more CreateJS libraries. For example, the event model.
JavaScript
14
star
14

build

The CreateJS build tools & process.
CSS
10
star