diff --git a/.gitignore b/.gitignore index 88e35a3c..14eedf8d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ docs/**/ **/.sass-cache/ main.css *.codekit +tests/.grunt +_SpecRunner.html diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..41a9ccc6 --- /dev/null +++ b/.npmignore @@ -0,0 +1,14 @@ +_assets +build +bower.json +dev +docs +examples +extras +icon.png +lib/**-NEXT**.js +spikes +src +tests +tutorials +VERSIONS.txt \ No newline at end of file diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..4ca50b6c --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,27 @@ +### TODO +- [ ] Is this a question or bug? [Stack Overflow](https://stackoverflow.com/questions/tagged/createjs) is a much better place to ask any questions you may have. + +- [ ] Did you search the [issues](https://github.com/CreateJS/SoundJS/issues) to see if someone else has already reported your issue? If yes, please add more details if you have any! + +- [ ] If you're using an older [version](https://github.com/CreateJS/SoundJS/blob/master/VERSIONS.txt), have you tried the latest? + +- [ ] If you're requesting a new feature; provide as many details as you can. Why do you want this feature? Do you have ideas for how this feature should be implemented? Pseudocode is always welcome! + + +### Issue Details +* Version used (Ex; 1.0): + + +* Describe whats happening (Include any relevant console errors, a [Gist](https://gist.github.com/) is preferred for longer errors): + + + +* OS & Browser version *(Please be specific)* (Ex; Windows 10 Home, Chrome 62.0.3202.94): + + + +* Do you know of any workarounds? + + + +* Provide any extra details that will help us fix your issue. Including a link to a [CodePen.io](https://codepen.io) or [JSFiddle.net](https://jsfiddle.net) example that shows the issue in isolation will greatly increase the chance of getting a quick response. diff --git a/README.md b/README.md index 9521eda3..61aa4eb5 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,21 @@ 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 Web Audio, and a Flash fallback. A mechanism has been provided for easily tying in audio preloading to -[PreloadJS](http://preloadjs.com) +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](http://createjs.com/preloadjs/). ## Example - createjs.Sound.addEventListener("fileload", handleLoadComplete); - createjs.Sound.registerSound({src:"path/to/sound.mp3|path/to/sound.ogg", id:"sound"}); - function handleLoadComplete(event) { - createjs.Sound.play("sound"); - } +```javascript +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 @@ -21,10 +25,12 @@ Built by gskinner.com, and released for free under the MIT license, which means ## Support and Resources * Find examples and more information at the [SoundJS web site](http://soundjs.com/) -* Read the [documentation](http://createjs.com/Docs/SoundJS/) -* You can also ask questions and interact with other users at our [Community](http://community.createjs.com) site. +* Read the [documentation](http://createjs.com/docs/soundjs/) +* Discuss, share projects, and interact with other users on [reddit](http://www.reddit.com/r/createjs/). +* Ask technical questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/soundjs). +* File verified bugs or formal feature requests using Issues on [GitHub](https://github.com/CreateJS/SoundJS/issues). * Have a look at the included [examples](https://github.com/CreateJS/SoundJS/tree/master/examples) and -[API documentation](http://createjs.com/Docs/SoundJS/) for more in-depth information. +[API documentation](http://createjs.com/docs/soundjs/) for more in-depth information. ## Classes @@ -33,7 +39,7 @@ Built by gskinner.com, and released for free under the MIT license, which means 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. -### [SoundInstance](http://createjs.com/Docs/SoundJS/classes/SoundInstance.html) +### [SoundInstance](http://createjs.com/Docs/SoundJS/classes/AbstractSoundInstance.html) 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. @@ -46,9 +52,13 @@ run locally, and the HTML audio plugin will be used instead. The fallback built-in plugin, which manages audio playback via the HTML5