CodeIgniter Forums
PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) (/showthread.php?tid=11717)

Pages: 1 2


PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - El Forum - 09-20-2008

[eluser]pincs[/eluser]
I got alot of issue on the player when i use a php file to display the flv movie. Here is the sample code on it.

Code:
&lt; script type="text/javascript" src="/mediaplayer2/swfobject.js"&gt; < /script >
    &lt; script &gt;
        var s1 = new SWFObject("player.swf","ply","328","200","9","#FFFFFF");
        s1.addParam("allowfullscreen","true");
        s1.addParam("allowscriptaccess","always");
        s1.addParam("flashvars","file=video.flv&image=preview.jpg");
        s1.write("container");
     < /script >



my ci controller and view code

Code:
&lt;!--flv controller code--&gt;
flv.php
function playflv(){

$this->load->view("playview");

}
&lt;!--flv view code--&gt;
playview.php
&lt;html&gt;
&lt;head&gt;&lt;title>demo&lt;/title&gt;&lt;/head>
&lt;body&gt;
&lt; script type="text/javascript" src="/mediaplayer2/swfobject.js"&gt; < /script >
   &lt; script &gt;
        var s1 = new SWFObject("player.swf","ply","328","200","9","#FFFFFF");
        s1.addParam("allowfullscreen","true");
        s1.addParam("allowscriptaccess","always");
        s1.addParam("flashvars","file=video.flv&image=preview.jpg");
        s1.write("container");
    < /script >

&lt;/body&gt;
&lt;/html&gt;

Like the above code, when I visit http://localhost/index.php/flv/playflv
I do not see anything, I do not know why

The issues I'm having with it are:

1. Auto start doesn't work
2. Any kind of code or flashvars I add at the end of the flvfilevars it doesn't work
3. The buffer image shows automically that it is done buffering.

Please let me know any solutions on how i can fixed this issue.

Thanks in advance.

I also want to know http://www.jeroenwijering.com/?item=JW_FLV_Media_Player Web site to download the player, contained in documents flv is compressed, and when I opened directly when no video, only to hear the voice of And when I open the page through time to see the video


PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - El Forum - 09-20-2008

[eluser]Asinox[/eluser]
Do u hav the swfObject.js there?


PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - El Forum - 09-20-2008

[eluser]pincs[/eluser]
I have updated content, and I write the script does not show


PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - El Forum - 09-20-2008

[eluser]Michael Wales[/eluser]
Does this script work, as you expect, outside of CI? In good old plain HTML files?


PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - El Forum - 09-21-2008

[eluser]Sumon[/eluser]
What about player.swf location? For my application i use
Code:
var s1 = new SWFObject("&lt;?=base_url()?&gt;player.swf","ply","328","200","9","#FFFFFF");
and place player.swf file in my server root. you can change it according to your need.


PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - El Forum - 09-21-2008

[eluser]pincs[/eluser]
I used to download flv from http://www.jeroenwijering.com/?item=JW_FLV_Media_Player

When I was alone here I can see the video
"readme.html"



When I put my php directory site after not be able to see video


PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - El Forum - 09-21-2008

[eluser]Sumon[/eluser]
Let us make sure about included file locations. You include two files swfobject.js and player.swf. Where the file actually located in your server or CI? is it in site root or root/mediaplayer2/ or application/views/ or somewhere else.
Code:
&lt; script type="text/javascript" src="/mediaplayer2/swfobject.js"&gt; < /script >
&lt; script &gt;
   var s1 = new SWFObject("player.swf","ply","328","200","9","#FFFFFF");
   //All other codes
< /script >
This is very important because if your file is not included correctly there are no hope to works.


PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - El Forum - 09-21-2008

[eluser]pincs[/eluser]
I use such a success of the Code

Code:
&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab
#version=6,0,29,0" width="240" height="180"&gt;
<param name="movie" value="flv.swf?vcastr_file=video.flv">
<param name="quality" value="high">
<param name="allowFullScreen" value="true" />
&lt;embed src="flv.swf?vcastr_file=video.flv" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="240" height="180"&gt;&lt;/embed>
&lt;/object&gt;

But,
Why
Code:
&lt; script type="text/javascript" src="/swfobject.js"&gt;&lt; /script >

    &lt; script type="text/javascript" &gt;
        var s1 = new SWFObject("/player.swf","ply","328","200","9","#FFFFFF");
        s1.addParam("allowfullscreen","true");
        s1.addParam("allowscriptaccess","always");
        s1.addParam("flashvars","file=video.flv&image=preview.jpg");
        s1.write("container");
     < /script >
Unsuccessful


PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - El Forum - 09-21-2008

[eluser]Sumon[/eluser]
Where is your player.swf file stored? is it in your root directory?


PROBLEM WHEN FLV FILE IS BEING LOADED USING PHP(Codeigniter view) - El Forum - 09-21-2008

[eluser]pincs[/eluser]
[quote author="Sumon" date="1222041210"]Where is your player.swf file stored? is it in your root directory?[/quote]

I put it in the root directory or view, do not use
Who can provide a useful code for me that I am using IE6 debugging
My e-mail address is:[email protected]