https://github.com/rcaloras/gwt-soundmanager2
Updated GWT SoundManager2 wrapper
https://github.com/rcaloras/gwt-soundmanager2
audo gwt gwt-soundmanager2 soundmanager2 soundmanager2-wrapper
Last synced: 2 months ago
JSON representation
Updated GWT SoundManager2 wrapper
- Host: GitHub
- URL: https://github.com/rcaloras/gwt-soundmanager2
- Owner: rcaloras
- License: mit
- Created: 2012-05-03T05:46:42.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2018-02-18T05:52:49.000Z (about 7 years ago)
- Last Synced: 2025-02-02T04:24:37.549Z (3 months ago)
- Topics: audo, gwt, gwt-soundmanager2, soundmanager2, soundmanager2-wrapper
- Language: JavaScript
- Homepage: www.coolhandjuke.com
- Size: 742 KB
- Stars: 9
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE.txt
Awesome Lists containing this project
README
# GWT-SoundManager2
GWT-SoundManager2 is a wrapper for the SoundManager2 library to allow easy use with GWT (Google Web Toolkit).Its aim is to take a proven, well supported, and mature solution for playing audio (SoundManager2) in the browser and provide a robust, updated, and easy to use GWT interface. Ideally, it's the quickest way to add audio to your GWT application!
## Why another SoundManager2 wrapper for GWT?
After reviewing other wrappers and audio libraries such as:
[gwt-sound](http://code.google.com/p/gwt-sound/) [gwt-sm](http://code.google.com/p/gwtsm/) [gwt-voice](http://code.google.com/p/gwt-voices/)
It looked like the state of audio in GWT applications was being neglected and not supported. Most of the aforementioned libraries are either dated, not supported, or don't provide the full range of functionality that is capable with SoundManager2.This wrapper was created as a fork of gwt-sound, originally written by Jeffery Miller. It's now based on GWT 2.4 and the latest version of SoundManager2 (Which now has killer support for all kinds of browsers. Horray for Android and Iphone!) It was developed for, and currently being used by, [Coolhandjuke](http://www.coolhandjuke.com).
Follow us on [Twitter](http://www.twitter.com/coolhandjuke)! Any issues or questions are more than welcome.
## Working Example
There's also a small example project [Gwt-SoundManager2 Example](https://github.com/rcaloras/gwt-soundmanager2-example).# Quick Start using GWT-SoundManager2
## Add it to your projectReference the jar file in your classpath. The latest release .jar can be found here [gwt-soundmanager2-0.1.4.jar](http://bit.ly/1iDAxoL), in the [Downloads](https://github.com/rcaloras/gwt-soundmanager2/downloads) tab, or in the [Maven-Repo](https://github.com/rcaloras/rcaloras-mvn-repo/tree/master/releases/com/chj/gwt-soundmanager2). Snapshots can be found in the [Maven-Sanpshot-Repo](https://github.com/rcaloras/rcaloras-mvn-repo/tree/master/snapshots/com/chj/gwt-soundmanager2).
### If you're using maven
#### Add the repository
```xml
gwt-soundmanager2-releases
https://raw.github.com/rcaloras/rcaloras-mvn-repo/master/releases
```
...add the dependency to your pom.xml.
```xml
com.chj
gwt-soundmanager2
0.1.4
```### Inherit it in your gwt.xml
```xml
```## Use it to make some noise!
```java
final String SOUND_ID = 'soundID';
final SoundManager sm = SoundManager.quickStart();
//Play our sound once SoundManager2 has loaded
sm.onReady(new com.chj.gwt.client.soundmanager2.Callback(){
public void execute() {
sm.play(SOUND_ID,"/path/to/some/.mp3");
}
});
```### Need to configure SoundManager2?
Obtain an SM2 instance, configure it, and then beginDelayedInit.
```java
SoundManager soundManager = SoundManager.getInstance();
soundManager.setUseHtml5Audio(true)
soundManager.setFlashVersion(9);
soundManager.setNoSWFCache(true);
soundManager.setFlashLoadTimeout(1000);
//SoundManager must be init'd before it can be used.
soundManager.beginDelayedInit();
```
## Official SoundManager2 Documentation
SoundManager2 documentation and resources can be found at [Schillmania](http://www.schillmania.com/projects/soundmanager2/doc/). Much thanks to Scott Schiller for the awesome SoundManager2 project.
http://www.schillmania.com/projects/soundmanager2/