adding flv player

Discussion in 'PHP' started by irdogg, Sep 6, 2010.

  1. #1
    im thinking i need to add the swfobject <script type='text/javascript' src='swfobject.js'></script> on line 3

    line1  elseif($ext == "flv"){
    line2  $playcontent = "<center>
    line3  <script type=\"text/javascript\">
    line4  document.write('<embed src=\"".$base_url."player/player.swf\" flashvars=\"autoPlay=true&flvPath=".$base_url."player/".$gamefilepath."&flvTitle=flvfile&startFrame=1&bgColor=0xFFFFFF\" quality=\"high\" bgcolor=\"#ffffff\" name=\"flvfile\" allowscriptaccess=\"none\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" align=\"center\" height=\"290\" width=\"330\">');
    line5  </script>
    line6  <noscript>
    line7  <embed src=\"".$base_url."player/player.swf\" flashvars=\"autoPlay=true&flvPath=".$base_url."player/".$gamefilepath."&flvTitle=flvfile&startFrame=1&bgColor=0xFFFFFF\" quality=\"high\" bgcolor=\"#ffffff\" name=\"flvfile\" allowscriptaccess=\"none\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" align=\"center\" height=\"290\" width=\"330\">
    line8  </noscript>
    line9  </center>"; 
    line10  }
    PHP:
    the code its spitting out.

    <script type="text/javascript">
      document.write('<embed src="http://mysite.com/player/player.swf" flashvars="autoPlay=true&flvPath=http://mysite.com/player/http://www.greeddd.com/content/05.flv&flvTitle=flvfile&startFrame=1&bgColor=0xFFFFFF" quality="high" bgcolor="#ffffff" name="flvfile" allowscriptaccess="none" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="center" height="290" width="330">');
      </script>
      <noscript>
      <embed src="http://mysite.com/player/player.swf" flashvars="autoPlay=true&flvPath=http://mysite.com/player/http://www.greeddd.com/content/05.flv&flvTitle=flvfile&startFrame=1&bgColor=0xFFFFFF" quality="high" bgcolor="#ffffff" name="flvfile" allowscriptaccess="none" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="center" height="290" width="330">
      </noscript>
    PHP:
    somewhere its just not right it doesnt play if i use an embed it works fine.
     
    irdogg, Sep 6, 2010 IP