buzz

Extern classes of Buzz for Haxe - A Javascript HTML5 Audio library.
https://github.com/adireddy/haxe-buzz

To install, run:

haxelib install buzz 1.1.11 

See using Haxelib in Haxelib documentation for more information.

README.md

Haxelib Version Build Status Built with Grunt

haxe buzz logo

Externs of Buzz for Haxe - A Javascript HTML5 Audio library.

Installation

haxelib install buzz

Demo

Look at the samples folder for the source code of above example.

Usage


package ;

import buzz.Buzz;
import buzz.BuzzSound;
import buzz.events.BuzzEvent;

class Main {

	private var _sound:BuzzSound;

	public function new() {
	    //autoplay is false by default
	    //this is just to show how you can set default properties
	    //like autoplay, loop, preload, etc
  		Buzz.defaults.autoplay = false;
  		Buzz.defaults.webAudioApi = true;
  		_sound = new BuzzSound("sounds/test", { 
  			formats: [ "ogg", "mp3" ],
  			preload: true 
  		});
  		_sound.bind(BuzzEvent.CAN_PLAYTHROUGH, _playSound);
	}
	
	private function _playSound():Void {
      	_sound.play();
  	}

	private static function main() {
		new Main();
	}
}

Licensing Information

MIT license

This content is released under the MIT License.

Buzz is written by Jay Salvat and licensed under the MIT License.

Contributors
adi
adireddy
Version
1.1.11
Published
9 years ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub