This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 13th, 2012  |  syntax: None  |  size: 1.65 KB  |  views: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to Play dynamic video into flowlayer
  2. <?php
  3. if($total_count > 0)
  4. {
  5.    while($val =$objDB->get_row($rs_member))
  6.   {
  7.  // $flowplayer = "player".$val['video_id'];
  8.  $VideoPath = "uploadedvideo/video/".$val['video'];
  9. ?>
  10. <div style="border:#FF0000;">
  11.    <div id="video1">
  12.         <a href="<?=$VideoPath?>"
  13.     style="display:block;width:425px;height:300px;"
  14.     id="player">
  15.    </a>
  16.         <!-- this will install flowplayer inside previous A- tag. -->
  17.     <script>
  18.                         flowplayer("player", "flowplayer-3.2.5.swf",  {
  19.     clip: {
  20.         // these two configuration variables does the trick
  21.         url: '<?=$VideoPath?>',
  22.         autoPlay: false,
  23.         autoBuffering: true // <- do not place a comma here  
  24.     }
  25. });
  26.         </script>
  27.  
  28.  
  29.  
  30.  
  31.      </div>
  32.     </div>
  33. <?php
  34.   }
  35. }
  36. ?>
  37.        
  38. <?php
  39. if($total_count > 0)
  40. {
  41.   $Videos = array();
  42.    while($val =$objDB->get_row($rs_member))
  43.   {
  44.  // $flowplayer = "player".$val['video_id'];
  45.  $Videos[] = "uploadedvideo/video/".$val['video'];
  46.   }
  47.   $VideoPlaylist = "'" . implode("', '", $Videos) . "'"; // will look something like : 'vid1.fla', 'vid2.fla'
  48. ?>
  49. <div style="border:#FF0000;">
  50.    <div id="video1">
  51.         <a
  52.     style="display:block;width:425px;height:300px;"
  53.     id="player">
  54.    </a>
  55.         <!-- this will install flowplayer inside previous A- tag. -->
  56.     <script>
  57.                         flowplayer("player", "flowplayer-3.2.5.swf",  {
  58.     clip: {
  59.         // these two configuration variables does the trick
  60.         autoPlay: false,
  61.         autoBuffering: true // <- do not place a comma here  
  62.     },
  63.     playlist: [<?php echo $VideoPlaylist; ?>]
  64. });
  65.         </script>
  66.  
  67.  
  68.  
  69.  
  70.      </div>
  71.     </div>
  72. <?php
  73.   }
  74. ?>
clone this paste RAW Paste Data