Ive been trying for hours to get this to work, its a hover autostart script. If i link to the video directly it works but if i use a xml playlist it wont
<html>
<head>
<title>Multiple Player Mouseover Example</title>
<style type=text/css>
#placeholder1 { position:absolute; left:32px; top:100px; z-index:1 }
#placeholder2 { position:absolute; left:32px; top:250px; z-index:1 }
#place1 { position:absolute; left:32px; top:100px; width:160; height:130; z-index:2 }
#place2 { position:absolute; left:32px; top:250px; width:160; height:130; z-index:2 }
</style>
<script type="text/javascript" src="/swfobject.js"></script>
<script type="text/javascript">
var currentPlayer=null;
var currentFile;
var currentImage;
function removeOldPlayer() {
document.getElementById(currentPlayer).innerHTML = '<img src="'+currentImage+'" border="0" onclick="createPlayer(\''+currentPlayer+'\', \''+currentFile+'\', \''+currentImage+'\')">';
}
function createPlayer(thePlace, theFile, theImage, go) {
if (currentPlayer!=null) { removeOldPlayer(); }
currentPlayer=thePlace;
currentFile=theFile;
currentImage=theImage;
var s = new SWFObject("/player.swf","playerID","140","110","7");
s.addParam('allowscriptaccess', 'always');
s.addParam('flashvars','file='+theFile+''&controlbar=none&autostart=true&overstretch=fit&showicons=false');
s.write(thePlace);
}
</script>
</head>
<div id="placeholder1"><a href="http://www.macromedia.com/go/getflashplayer"><img src="/thumb/1573.jpg" width="140" height="110" border="0"></a></div>
<div id="placeholder2"><a href="http://www.macromedia.com/go/getflashplayer"><img src="/thumb/1974.jpg" width="140" height="110"border="0"></a></div>
<div id="place1"><img src="/thumb/1_1573.jpg" width="140" height="110" onmouseover="createPlayer('placeholder1', '/play.php?id=389', '', true)" onmouseout="removeOldPlayer()"></div>
<div id="place2"><img src="/thumb/1974.jpg" width="140" height="110" onmouseover="createPlayer('placeholder2', '/12325942212097480389.flv', '', true)" onmouseout="removeOldPlayer()"></div>
</body>
</html>
and in play.php
<?php
echo '<?xml version="1.0" encoding="UTF-8"?><playlist xmlns="http://xspf.org/ns/0/" version="1"><title>mixmedia</title> <tracklist>';
echo"<track>
<location>12325942212097480389.flv</location>
<image>/thumb/img.jpg</image>
</track>";
?>
You are missing the closing tags for the playlist:
<?phpecho "<?xml version='1.0' encoding='UTF-8'?>
<playlist xmlns='http://xspf.org/ns/0/' version='1'>
<title>mixmedia</title>
<trackList>";
echo " <track>
<location>12325942212097480389.flv</location>
<image>/thumb/img.jpg</image>
</track>";
echo " </trackList>
</playlist>";
?>