Tak tylko u mnie odpala wszystko z playlisty, która jest w php. Więc utwory są poza serwerem.
Po prostu chodzi mi o coś co można wyciągnąć z tego playera (callback).
Klikam play lub przechodzi do następnego utworu to wysyła jakieś info robię sobie w kodzie if i jeśli ma to w ifie to odpala się.
Czyli mam zrobić coś na zasadzie tego:
http://funkcje.net/view/12/23/2658/index.htmllub tego
http://www.webtips.pl/index.php?showtopic=...p;mode=threaded
Albo może zrobić jakoś tak, że wyśle mi ze skryptu prześle do php, a tam już sobie obrobię?
Nie mam już pojęcia, co z tym zrobić:/ Męczę się i dostaje już czegoś ;p
A to kod ten strony o której pisałem powyżej, można zassać wszystko z podanego linka.
Kod
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>E-Phonic MP3 Player Example</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="ep_player.js"></script>
<script type="text/javascript">
// <!--
////////////////////////////////////////////////
// Called by the EP_onEvent(evt) function
// (located in 'ep_player.js') when the status of
// the player changes.
function EP_eventHandler(evt)
{
// write the event to the text-area in the HTML page
EP_logEvent(evt);
switch(evt) {
case 'MP3_LOADING':
break;
case 'MP3_BUFFERING':
break;
case 'MP3_PLAYING':
// get track info
var t = EP_getTrackInfo('ep_player');
// write the event to the text-area in the HTML page
EP_logEvent('playlistIndex: '+t.playlistIndex);
EP_logEvent('location: '+t.location);
EP_logEvent('title: '+t.title);
EP_logEvent('annotation: '+t.annotation);
EP_logEvent('creator: '+t.creator);
EP_logEvent('info: '+t.info);
EP_logEvent('image: '+t.image);
EP_logEvent('album: '+t.album);
EP_logEvent('trackNum: '+t.trackNum);
EP_logEvent('link: '+t.link);
EP_logEvent('----------------------------');
break;
case 'MP3_PREV':
break;
case 'MP3_NEXT':
break;
case 'MP3_SELECT':
// write the event to the text-area in the HTML page
EP_logEvent("Select MP3 (#"+EP_getTrackInfo('ep_player').playlistIndex+") from playlist ...");
break;
case 'MP3_PAUSED':
break;
case 'MP3_COMPLETE':
break;
case 'MP3_STOPPED':
break;
default:
break;
}
}
////////////////////////////////////////////////
// write the event to the text-area in the HTML page
function EP_logEvent(evt)
{
ep_form.events.value += '>'+evt+'\n';
}
// -->
</script>
</head>
<body bgcolor="#FFFFFF">
<!-- start mp3 player -->
<div id="flashcontent">
To view the <a href="http://www.e-phonic.com/mp3player/" target="_blank">E-Phonic MP3 Player</a> you will need to have Javascript turned on and have <a href="http://www.adobe.com/go/getflashplayer/" target="_blank">Flash Player 9</a> or better installed.
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("ep_player.swf", "ep_player", "269", "226", "9", "#FFFFFF");
so.addVariable("skin", "skins/nobius_platinum/skin.xml");
so.addVariable("playlist", "playlist.xml");
so.addVariable("autoplay", "false");
so.addVariable("shuffle", "false");
so.addVariable("repeat", "false");
so.addVariable("buffertime", "1");
// this parameter activates the use of event callbacks
// like MP3_PLAYING / MP3_PAUSED / MP3_STOPPED
so.addVariable("notifyonevent", "true");
so.addParam("allowscriptaccess", "always");
so.write("flashcontent");
// ]]>
</script>
<!-- end mp3 player -->
<br /><br />
<strong>Javascript functionality</strong><br />
Below are some examples of what can be done with the javascript API.<br />
For a full list of features please read the <a href="http://www.e-phonic.com/mp3player/documentation/#javascript" target="_blank">documentation</a>.<br />
<strong>Depending on your browser security settings, the javascript functionality will only work online (on a web server) and not on the local file system.</strong>
<br /><br />
<form name="ep_form">
Status: <br />
<textarea id="events" cols="60" rows="10" value=""></textarea><br />
<input id="loadmp3" type="text" size="60" value="<location>mp3/demo.mp3</location><creator>E-Phonic</creator><title>Track Loaded By Javascript</title>" /> <a href="javascript:EP_loadMP3('ep_player', ep_form.loadmp3.value);">load MP3</a><br />
<input id="playlist" type="text" size="60" value="http://www.e-phonic.com/mp3player/playlist.xml" /> <a href="javascript:EP_loadPlayList('ep_player', ep_form.playlist.value); ">load playlist</a><br />
<input id="playindex" type="text" size="60" value="2" /> <a href="javascript:EP_playIndex('ep_player', ep_form.playindex.value); ">play # in playlist</a><br />
</form>
<a href="#" onclick="EP_play('ep_player');">play</a><br />
<a href="#" onclick="EP_stop('ep_player');">stop</a><br />
<a href="#" onclick="EP_pause('ep_player');">pause</a><br />
<a href="#" onclick="EP_prev('ep_player');">previous track</a><br />
<a href="#" onclick="EP_next('ep_player');">next track</a><br />
<br /><br />
</body>
</html>