"Whats Playing"정보 표시 줄이있는 jPlayer가 수정되었습니다.jQuery의 요소에 스크롤러를 연결하십시오.
정보 표시 줄에 PHP 파일의 정보가 표시됩니다.
나는 플레이어 막대의 정보에 스크롤러를 부착해야하지만 그럴 수는 없다.
스크롤러는 별도의 js 파일에 있습니다.
http://www.maxvergelli.com/jquery-scroller/
jQuery를 :
getCurrentTrack();
$('.now_playing').SetScroller({
velocity: 50,
direction: 'horizontal',
startfrom: 'right',
loop: 'infinite',
movetype: 'linear',
onmouseover: 'pause',
onmouseout: 'play',
onstartup: 'play',
cursor: 'pointer'
});
function getCurrentTrack() {
$('.now_playing').load('/player/readerPlayer2.php');
setInterval(function() {
$('.now_playing').load('/player/readerPlayer2.php');
}, 9000);
};
PHP의 정보 :
<?php
header("Expires: Tue, 03 Jul 2040 06:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
$xml = simplexml_load_file("http://**.**.**.**:8000/live.xspf");
foreach ($xml->trackList->track as $data) {
$radio = $data->location;
$song = $data->title;
$info = $data->listeners;
}
echo '<div class="IceSong">'.$song.'</div>';
?>
답장을위한 Thanx. 나는 다른 하나에 스크립트를 수정했지만 스크롤러에 표시하는 정보를 얻을 수 없어 ... 스크롤러는 잘 작동하지만 .. -> http://stackoverflow.com/questions/13938174/draw-stats-from-php -file/13938552 # comment19220208_13938552 알고있는 경우이 해결책이 아직 없습니다. – TonalDev