Patrick Cavit![]()
A YUI3 audio player powered by the SoundManager 2 JS audio library by Scott Schiller. Supports easy progressive enhancement or JS initialization as well as plenty of display & functionality options.
<a href="song.mp3" class="no-time">MP3!</a>
<a href="song.mp3" class="volume">MP3!</a>
<a href="song.mp3" class="scrubber">MP3!</a>
<a href="song.mp3" class="autoload">MP3!</a>
<a href="song.mp3" class="volume scrubber no-time">MP3!</a>
<div id="js"></div>
<script>
YUI_config = {
ignore : [ "skin-sam-widget" ],
modules : {
"soundmanager-player" : {
fullpath : "soundmanager-player.js",
requires : [ "widget", "get", "event", "substitute", "event-mousenter" ]
}
};
YUI().use('gallery-soundmanager-player', function(Y) {
//progressive enhancement of <a> tags
Y.all("a").each(function(node) {
new Y.SoundManager.Player({
srcNode : node,
js : "soundmanager2-nodebug-jsmin.js"
}).render();
});
//building entirely from JS
new Y.SoundManager.Player({
url : "song.mp3",
js : "soundmanager2-nodebug-jsmin.js",
scrubber : true,
volumeControl : true
}).render("#js");
});
</script>No forum posts for this module.
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info