Hi guys,
I have an xml files that contains the url to a video :
<markers>
<ad src="ads/video/ad2.avi"/>
<ad src="ads/video/ad1.avi"/>
</markers>
i am using ajax/jquery library to display the video. that xml files changes so every 15 seconds i check the xml file generated if it has changed then show all the videos.
right now i have this which shows a video
<script type="text/javascript">
$(document).ready(function() {
$("#vehicleInfo").cornerz();
refreshData();
});
function refreshData() {
<?php
print "var veh = \"" . $_GET[vehID] . "\";" ;
?>
$.ajax({
type: "GET",
url: "getAds.php",
data: "veh="+veh,
success: function(xml) {
$('ad', xml).each(function (i) {
$("#src").html("<embed type=\"application/x-vlc-plugin\"name=\"video1\" autoplay=\"yes\" loop=\"no\" width=\"775\" height=\"575\"target=\""+ $(this).attr('src') + "\"/>");
});
setTimeout("refreshData()", 15000);
}
});
}
</script>
how could i loop shrough those videos one by one?