2011-06-09 51 views
0

这里是我的:如何播放动态视频到flowlayer

<?php 
if($total_count > 0) 
{ 
    while($val =$objDB->get_row($rs_member)) 
    { 
// $flowplayer = "player".$val['video_id']; 
$VideoPath = "uploadedvideo/video/".$val['video']; 
?> 
<div style="border:#FF0000;"> 
    <div id="video1"> 
     <a href="<?=$VideoPath?>" 
    style="display:block;width:425px;height:300px;" 
    id="player"> 
    </a> 
     <!-- this will install flowplayer inside previous A- tag. --> 
    <script> 
         flowplayer("player", "flowplayer-3.2.5.swf", { 
    clip: { 
     // these two configuration variables does the trick 
     url: '<?=$VideoPath?>', 
     autoPlay: false, 
     autoBuffering: true // <- do not place a comma here 
    } 
}); 
     </script> 




    </div> 
    </div> 
<?php 
    } 
} 
?> 

取而代之的是,我需要播放所有视频文件中的单页serially..how做this..please帮助

回答

1

如何创建你想播放的所有视频的数组,然后将它们添加到播放列表中,如下所示:

<?php 
if($total_count > 0) 
{ 
    $Videos = array(); 
    while($val =$objDB->get_row($rs_member)) 
    { 
// $flowplayer = "player".$val['video_id']; 
$Videos[] = "uploadedvideo/video/".$val['video']; 
    } 
    $VideoPlaylist = "'" . implode("', '", $Videos) . "'"; // will look something like : 'vid1.fla', 'vid2.fla' 
?> 
<div style="border:#FF0000;"> 
    <div id="video1"> 
     <a 
    style="display:block;width:425px;height:300px;" 
    id="player"> 
    </a> 
     <!-- this will install flowplayer inside previous A- tag. --> 
    <script> 
         flowplayer("player", "flowplayer-3.2.5.swf", { 
    clip: { 
     // these two configuration variables does the trick 
     autoPlay: false, 
     autoBuffering: true // <- do not place a comma here 
    }, 
    playlist: [<?php echo $VideoPlaylist; ?>] 
}); 
     </script> 




    </div> 
    </div> 
<?php 
    } 
?>