joshkersey / jquery-soundmanager Goto Github PK
View Code? Open in Web Editor NEWThis project forked from adriengibrat/jquery-soundmanager
Use SoundManager2 with jQuery
This project forked from adriengibrat/jquery-soundmanager
Use SoundManager2 with jQuery
@see http://www.schillmania.com/projects/soundmanager2/doc/download/#latest for Sound Manager download @see http://www.schillmania.com/projects/soundmanager2/doc/ for Sound Manager documentation USAGE EXEMPLES: /* Minimum settings */ // Always do settings before DOM is ready! $.playable('soundmanager/swf/'); $(function(){ // Simple usage for mp3 links $('a[href$=.mp3]').playable(); }); /* Options settings */ // Again, do settings before DOM is ready! $.playable('soundmanager/swf/', { // You can set all SM2 default options & properties, plus the followings: autoStart : false, // Start playing the first item playNext : false, // Play next item when previous ends loopNext : false, // Play first item when no more next item pauseOnly : false, // Just pause previous on skip playAlone : false, // Force stop/pause previous on skip doUnload : false // Unload sound on stop/finish }); /* You also can pass just one object containing the swf URL, for convinience: $.playable({ url: 'soundmanager/swf/', autoStart : false, ... }); */ $(function(){ //You can also overwrite default options for each DOM selection $('ul.playlist').playable({autoStart: true, playNext: true, playAlone: true, pauseOnly: false, doUnload: false}); $('div.sampler').playable({autoStart: false, playNext: false, playAlone: false, pauseOnly: false, doUnload: false}); $('a.listen').playable({autoStart: false, playNext: false, playAlone: true, pauseOnly: true, doUnload: true}); // TO Modify Sound Objects (you can use all SMSound methods) $('.playlist').playable('setVolume', 50); // reduce sound to 50% for the whole playlist $('.sampler .playable:eq(1)').playable('pause'); // pause the second playable item of the sampler $('.listen .playable:last').playable('play'); // play the last playable item of the '.listen' list ... // TO Play next song in current playlist $.playable.next(); // plays next song with the same selector as the current song playing $.playable.next(2); // plays the one after the next song with the same selector as the current song playing $.playable.next(-1); // plays previous song with the same selector as the current song playing ... }); FOR DEVELOPERS * You can access sound object via $(element).data('playable') * You can add your own event handlers with $(element).bind( type* , function( event, sound ){...}) [* SMSound events] * You can add more SMSound events handlers in $.playable.events (like onid3, ondataerror, etc.. @see jquery.playable.ui.simple.js for a exemple how to extend the plugin/build an UI)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.