QN5 Music « visit
This is my Source Code and I don't want to show it here
View Source Code only (as overlay)
// That code snippet belongs to QN5 Music - http://qn5.com
/* Used in the music section of QN5.com */
QN5.Playlist = $.klass({
initialize: function(playerId, li) {
var $this = this;
var sm = soundManager;
$this.id = 'sound-' + playerId;
$this.originalDocumentTitle = document.title;
$this.player = $(li);
$this.link = $this.player.find('a.control:first-child');
$this.link.click(function(event) {
event.preventDefault();
if ( !$this.player.hasClass('playing') ) {
sm.pauseAll();
}
sm.togglePause($this.id);
});
$this.permalink = $this.player.find('a.permalink:first');
if ( !window.isIE6 ) {
$this.permalink
.mouseover(function() { $this.player.addClass('hover'); })
.mouseout(function() { $this.player.removeClass('hover'); });
}
$this.position = $this.player.find('span.position:first');
sm.createSound({
id:$this.id,
url:$this.link.attr('href'),
autoLoad:false,
playNext:true,
onplay: function() {
$this.play(this, 'play');
},
onresume: function() {
$this.play(this, 'resume');
},
onpause: function(){
$this.pause();
},
onfinish: function() {
$this.pause();
$this.player.next('li').find('a.control:first').click();
},
whileloading: function() {
},
whileplaying: function() {
$this.position.css('width', (((this.position/this.durationEstimate)*100)+'%'));
}
});
},
play: function(currentSound, type) {
var $this = this;
var sm = soundManager;
if (type == 'play') {
sm.play(currentSound);
} else if (type == 'resume') {
sm.resume(currentSound);
}
document.title = 'NOW PLAYING: ' + $this.link.attr('title');
$this.player.addClass('playing').removeClass('paused');
},
pause: function() {
var $this = this;
document.title = $this.originalDocumentTitle;
$this.player.removeClass('playing');
}
});
Syndicate
Categories
Statistics
There are 330 Sites with 745 Links of Interest in 18 Categories. The latest Site was added 4 months ago.
About
This is a project by Sebastian Senf, for his part jQuery user and lover too. Follow me.