Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-21 14:51:31

jeffBrady
Member
From: Wisconsin-US
Registered: 2009-06-08
Posts: 11

How do I embed an flv video?

I need to embed a .swf file which loads a small video. i currently have the .swf file and the .flv files loaded in the site root. I’ve tried to embed the swf with swfobject 1, but it doesn’t show the video, and it won’t honor the background color specified in the “new SWFObject” statement.

The embed code looks like this:

<script type=“text/javascript”> var so = new SWFObject(“my_vid.swf”, “loader”, “320”, “240”, “8”, “#121212”); so.addParam(“allowFullScreen”,“true”); so.addParam(“quality”, “best”); //so.addParam(“wmode”, “transparent”); so.write(“myContent”);
</script>

the flvplayer is set to load the .flv from the same directory the swf resides in (to reiterate).

Is it just a matter referencing a different url?

Thanks
-Jeff


Rocky!?

Offline

#2 2009-08-21 15:07:45

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: How do I embed an flv video?

Is the problem the path from the page or the path inside the swf to the flv? Below is a possible solution to both.

You’re not using swf object 2.0.???
Anyway heres is header I use on the motion part of my portfolio site – I just put the path to the swf in the article’s excerpt –
(Uses swf obeject 2.0.)
Don’t put the head in a form though, just keep it right in the page.

<script type="text/javascript" src="/swfobject.js"></script> <script type="text/javascript"> var flashvars = {}; var params = {}; var attributes = {}; <txp:if_individual_article><txp:article form="motion_swf" /><txp:else /> swfobject.embedSWF("/newhome.swf", "flashwrap", "500", "331", "9.0.0", false, flashvars, params, attributes);</txp:if_individual_article> </script>

then the form motion_swf:

<txp:if_excerpt>swfobject.embedSWF("<txp:excerpt />", "flashwrap", "500", "331", "9.0.0", false, flashvars, params, attributes);</txp:if_excerpt>

If your problem is targeting the flv from the swf than it depends if the swf is on the home page or not. if not put the swf in regular html page in the textpattern folder on your server and try just targeting to whatever folder the flv is in. Then it’s probably just the path to the flv inside the swf that needs to go up a level. hth.


its a bad hen that wont scratch itself.
photogallery

Offline

#3 2009-08-21 15:32:55

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: How do I embed an flv video?

I find this plugin to be useful for embedding videos without much fuss.

Offline

#4 2009-08-21 15:49:14

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: How do I embed an flv video?

the_video is indeed excellent but it does not offer flv support. If you just want flvs try cfm_videoplayer


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2009-08-21 16:03:15

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: How do I embed an flv video?

Thanks Colak, I wasn’t aware of cfm_videoplayer before your post, it looks useful particularly as I hadn’t realised the_video doesn’t handle .flv formatted files. Had I been aware of that about 18 months ago it might have saved me from a temper tantrum and my poor Teddy being hurled into the corner once more.

Offline

#6 2009-08-21 16:39:03

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: How do I embed an flv video?

Hi Joe, I guess my statement was half right. One could load a local swf flv player using the_video. It’s just that some would prefer a more straight forward flv dedicated approach, which is the reason I suggested cfm_videoplayer.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#7 2009-08-23 09:25:00

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 310
Website GitHub GitLab Mastodon Twitter

Re: How do I embed an flv video?

What the color settings mean, how to apply them to cfm_videoplayer? Neither dyes, and backcolor="#CC9" completely hides the controlbar, standing in black. At least on the default skin.

And a minor question: it is possible to set div class, besides of automatically assigned id?

Offline

#8 2009-08-23 11:28:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: How do I embed an flv video?

Vienuolis wrote:

What the color settings mean, how to apply them to cfm_videoplayer?

Hi Vladas,

I’m afraid I don’t use the plugin so it might be a safer bet if you asked your questions on cfm_videoplayer’s thread.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB