Welcome Guest, Not a member yet? Register   Sign In
FLV not loading
#1

[eluser]polipspy[/eluser]
Hello!

I need help in embedding flv movies to views.

Here is what I did.

I made folders for flash movie
/flashmovie/movie.flv
then I made another for the file .swf
/tools/mediaplayer.swf

I also have another folder for javascripts
/javascripts/swfobject.js

These folders are located in CI root folder together with the system folder

I loaded the javascript file and embedded a code in one of the views like this:

<div id="video" >

var so = new SWFObject('tools/mediaplayer.swf','player','369','312','8');
so.addParam("allowfullscreen","true");
so.addParam("bgcolor","#557722");
so.addVariable('file','flashmovie/movie.flv');
so.addVariable('linkfromdisplay','true');
so.addVariable('lightcolor','0x557722');
so.addVariable('searchbar','false');
so.addVariable('shuffle','true');
so.addVariable('overstretch','true');
so.addVariable("width","369");
so.addVariable("height","312");
so.write('video');

</div>
AND I have this in my .htaccess file.

RewriteEngine On
RewriteBase /
RewriteRule ^$ index.php [L]
RewriteCond $1 !^(index\.php|remote|images|system|stylesheets|javascripts|js|scripts|css|user_guide|tools|flashmovie|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [QSA,L]


but its not working. The movie is not loading at all.

I really need to get this working.

Thanks in advance.
#2

[eluser]George Ornbo[/eluser]
Couple of things to check

1. Have you included the swfobject script?
2. Have you included the script tags around your swfobject parameters?
3. The parameters should be outside the div that you want to write the flash movie into

To debug I suggest commenting out the rewrite rules in the .htaccess file. One you get it working you can uncomment the rules and check it is all working.

Here's a working version for you to compare.

*EDIT* - the script tags get stripped out by EE so check out the source here to see a working version.
#3

[eluser]polipspy[/eluser]
The flash movie is working when it is outside CI.
But when I put it in the views it doesn't work.
#4

[eluser]chuckleberry13[/eluser]
I am having the exact same problem! I posted it here http://ellislab.com/forums/viewthread/78161/ but haven't got any replies. I could embed a swf file fine but when I load .flv files nothing happens.
#5

[eluser]TheFuzzy0ne[/eluser]
Does it work if you try and call the file directly, by sticking the URL in your address bar?
#6

[eluser]JoostV[/eluser]
You need to call the file using the relative path to mediaplayer.swf

So, if your mediaplayer is her; /tools/mediaplayer.swf
And your file is here: /flashmovie/movie.flv

You need to call the file as such:
Code:
s0.addVariable('file', '../flashmovie/movie.flv');
#7

[eluser]JunglistPerfection[/eluser]
To solve your problem with showing flv videos, you need to use embedded tags for it to work. Similar to what youtube.com uses.

Its a bit of a hassle, but it works. I wish CI would fix this problem.
#8

[eluser]polipspy[/eluser]
Thank you so much guys for your replies. I was able to make it work. All I did is put directly the url.
#9

[eluser]calingrim[/eluser]
I have a similar problem. The flv is loading on the main page but on any other page it won't show up.
If I use base_url() to get to the player and same to get to the xml, it will play the songs only on the main page on the any other pages the player will show up but not load any song.
The problem is that he actually get's the xml file because he is showing me the title of the song.
Any ideas?

This will load the player but he will play the songs only on yoursite.com
Code:
&lt;embed src="&lt;?=base_url()?&gt;mp3player/audio_player_files/audioPlayer.swf"
       name="player"
       id="player"
       width="250"
       height="215"
       version="6"
       bgcolor="#413a47"
       flashvars="xmlPath=&lt;?=base_url()?&gt;mp3player/audio_player_files/data.xml"&gt;&lt;/embed>

This will load the player but he will show up only on yoursite.com
Code:
&lt;embed src="mp3player/audio_player_files/audioPlayer.swf"
       name="player"
       id="player"
       width="250"
       height="215"
       version="6"
       bgcolor="#413a47"
       flashvars="xmlPath=mp3player/audio_player_files/data.xml"&gt;&lt;/embed>




Theme © iAndrew 2016 - Forum software by © MyBB