Skip to content

Commit

Permalink
add music
Browse files Browse the repository at this point in the history
  • Loading branch information
Firsh3k committed May 9, 2012
1 parent 594b755 commit 21b8356
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 0 deletions.
Binary file added _includes/JB/audioplayer/audio/reason.mp3
Binary file not shown.
Binary file added _includes/JB/audioplayer/audio/sunday.mp3
Binary file not shown.
Binary file added _includes/JB/audioplayer/flash/audioplayer.swf
Binary file not shown.
19 changes: 19 additions & 0 deletions _includes/JB/audioplayer/js/example1.js
@@ -0,0 +1,19 @@
$(document).ready(function() {

$('.audio').each(function(){

audio_file = $(this).attr('href');

$(this).flash(
{
swf: '_includes/JB/audioplayer/flash/audioplayer.swf',
flashvars:
{
soundFile: audio_file
}
}
);

});

});
34 changes: 34 additions & 0 deletions _includes/JB/audioplayer/js/example2.js
@@ -0,0 +1,34 @@
// close other audio players
// called by audio player when click on play button
function ap_stopAll(player_id)
{
$('.audio').each(function(){
if($(this).attr('href') != player_id)
{
$(this).find('object')[0].SetVariable("closePlayer", 1);
}
else
{
$(this).find('object')[0].SetVariable("closePlayer", 0);
}
});
}

$(document).ready(function() {

$('.audio').each(function(){

audio_file = $(this).attr('href');

$(this).flash(
{
swf: 'flash/audioplayer.swf',
flashvars:
{
playerID: "'" + audio_file + "'",
soundFile: audio_file
}
}
);
});
});
48 changes: 48 additions & 0 deletions _includes/JB/audioplayer/js/example3.js
@@ -0,0 +1,48 @@
// close other audio players
// called by audio player when click on play button
function ap_stopAll(player_id)
{
$('.audio_flash').each(function(){
if($(this).attr('id') != player_id)
{
$(this).find('object')[0].SetVariable("closePlayer", 1);
}
else
{
$(this).find('object')[0].SetVariable("closePlayer", 0);
}
});
}

$(document).ready(function() {

$('.audio').each(function() {
audio_file = $(this).attr('href');
audio_title = $(this).text();
audio_id = $(this).attr('id');

div = $('<div class="audio_flash" id="' + audio_id + '"></div>');
$(this).after(div);
$(this).after(audio_title);
$(this).remove();
div.flash(
{
swf: 'flash/audioplayer.swf',
flashvars:
{
soundFile: audio_file,
playerID: "'" + audio_id + "'",
quality: 'high',
lefticon: '0xFFFFFF',
righticon: '0xFFFFFF',
leftbg: '0x357CCE',
rightbg: '0x32BD63',
rightbghover: '0x2C9D54',
wmode: 'transparent'
},
height: 50
}
);
});

});
32 changes: 32 additions & 0 deletions _includes/JB/audioplayer/js/jquery.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions _includes/JB/audioplayer/js/jquery.swfobject.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions index.md
Expand Up @@ -80,6 +80,13 @@ Here's to share some meaningful masterpiece of my work.
<div><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="555" height="80" id="passing" > <param name="movie" value="http://www.douban.com/doushow/firsh3k/collection_latest_music_6_6_small_nologo_noself/doushow.swf" /> <param name="quality" value="high" /> <param name="scale" value="noscale"/> <param name="align" value="tl"/> <param name="wmode" value="transparent"/> <embed src="http://www.douban.com/doushow/firsh3k/collection_latest_music_6_6_small_nologo_noself/doushow.swf" wmode="transparent" quality="high" width="555" height="80" name="passing" scale="noscale" align="tl" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object></div>
=--

<script type="text/javascript" src="_includes/JB/audioplayer/js/jquery.min.js"></script>
<script type="text/javascript" src="_includes/JB/audioplayer/js/jquery.swfobject.min.js"></script>
<script type="text/javascript" src="_includes/JB/audioplayer/js/example1.js"></script>

<a class="audio" href="_includes/JB/audioplayer/audio/reason.mp3">
</a>


<!--
<div style="float:left;width:160px;">
Expand Down

0 comments on commit 21b8356

Please sign in to comment.