| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Inventar Registriert seit: Jul 2002
Beiträge: 6.882
| JPlayer jPlayer : HTML5 Audio & Video for jQuery Ich bin nun etwas zu lange am Üben und stehe auf dem Schlauch: Code: //Start JQuery JPlayer
var playItem = 0;
var myPlayList = [
{ name : "Until The End", mp3 : "http://www.whentheywake.com/wtw/header/music/until_the_end.mp3" },
{ name : "Hero's Last Fight", mp3 : "http://www.whentheywake.com/wtw/header/music/heros_last_fight.mp3" }
];
$("#jquery_jplayer").jPlayer({
swfPath: "jplayer/"
}).jPlayer("onSoundComplete", function() {
playListNext();
});
$("#jplayer_prev").click( function() {
playListPrev();
return false;
});
$("#jplayer_next").click( function() {
playListNext();
return false;
});
$("#jplayer_center").click( function() {
$("#jquery_jplayer").jPlayer("play");
return false;
});
function playListConfig( index ) {
playItem = index;
alert( index );
$('#jplayer_title').text( myPlayList[playItem].name );
$("#jquery_jplayer").jPlayer("setFile", myPlayList[playItem].mp3);
}
function playListChange( index ) {
playListConfig( index );
$("#jquery_jplayer").jPlayer("play");
}
function playListNext() {
var index = (playItem+1 < myPlayList.length) ? playItem+1 : 0;
playListChange( index );
}
function playListPrev() {
var index = (playItem-1 >= 0) ? playItem-1 : myPlayList.length-1;
playListChange( index );
}
//End JQuery JPlayer HTML-Code: <div style="width:150px;float:left;"> <span id="jquery_jplayer"> </span> <div class="jplayer_button" id="jplayer_prev"></div> <div class="jplayer_button" id="jplayer_center"></div> <div class="jplayer_button" id="jplayer_next"></div> <div id="jplayer_title"></div> </div>
__________________ (\__/) (='.'=) (")_(") |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |