Embed an FLV file into a web page

This is if  you have an FLV file and you don't want any fancy management system, you just want your FLV to play on your webpage.

The following example is a demonstration of how to do this without installing anything on your webserver.

 I like to use flowplayer for this example but my own systems can't use a solution as crude as this.

  1. Copy the below code (beginning and ending with object tags)
  2. Paste it into your HTML page
  3. Replace both instances of the text "http://my.video.com/myVideo.flv" with the full url of your own FLV.
  4. Save the HTML page and publish

The Code:

 

copyraw
<object width="460" height="320" data="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf" type="application/x-shockwave-flash">
	<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf" />
	<param name="allowfullscreen" value="true" />
	<param name="allowscriptaccess" value="always" />
	<param name="flashvars" value='config={"plugins":{"pseudo":{"url":"flowplayer.pseudostreaming-3.1.3.swf"},"controls":{"backgroundColor":"#000000","backgroundGradient":"low"}},"clip":{"provider":"pseudo","url":"http://my.video.com/myVideo.flv"},"playlist":[{"provider":"pseudo","url":"http://my.video.com/myVideo.flv"}]}' />
</object>
  1.  <object width="460" height="320" data="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf" type="application/x-shockwave-flash"> 
  2.      <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf" /> 
  3.      <param name="allowfullscreen" value="true" /> 
  4.      <param name="allowscriptaccess" value="always" /> 
  5.      <param name="flashvars" value='config={"plugins":{"pseudo":{"url":"flowplayer.pseudostreaming-3.1.3.swf"},"controls":{"backgroundColor":"#000000","backgroundGradient":"low"}},"clip":{"provider":"pseudo","url":"http://my.video.com/myVideo.flv"},"playlist":[{"provider":"pseudo","url":"http://my.video.com/myVideo.flv"}]}' /> 
  6.  </object> 


Additional: Stop AutoPlay
Thank you to Anna Moors for writing in and asking "how to stop the movie from playing automatically on page load?". Anna has since confirmed that the below code buffers her movie but only starts when clicked, ideal! Changes are: clip{ autobuffering, autoplay }
copyraw
<object
        width="460"
        height="320"
        data="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf"
        type="application/x-shockwave-flash"
        autoplay="false">

        <param name="autoplay" value="false" />
        <param name="autostart" value="0" />
        <param name="controller" value="true" />
        <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf" />
        <param name="allowfullscreen" value="true" />
        <param name="allowscriptaccess" value="always" />
        <param
                name="flashvars"
                value='
                        config={
                                "plugins":{
                                        "pseudo":{"url":"flowplayer.pseudostreaming-3.1.3.swf"},
                                        "controls":{"backgroundColor":"#000000","backgroundGradient":"low"}
                                },
                                "clip":{
                                        "provider":"pseudo",
                                        "url":"http://www.mysite.com/myMovie.flv",
                                        "autoBuffering":true,
                                        "autoPlay":false
                                },
                                "playlist":[{
                                        "provider":"pseudo",
                                        "url":"http://www.mysite.com/myMovie.flv"
                                }]
                        }' />
</object>
  1.  <object 
  2.          width="460" 
  3.          height="320" 
  4.          data="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf" 
  5.          type="application/x-shockwave-flash" 
  6.          autoplay="false"> 
  7.   
  8.          <param name="autoplay" value="false" /> 
  9.          <param name="autostart" value="0" /> 
  10.          <param name="controller" value="true" /> 
  11.          <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf" /> 
  12.          <param name="allowfullscreen" value="true" /> 
  13.          <param name="allowscriptaccess" value="always" /> 
  14.          <param 
  15.                  name="flashvars" 
  16.                  value=' 
  17.                          config={ 
  18.                                  "plugins":{ 
  19.                                          "pseudo":{"url":"flowplayer.pseudostreaming-3.1.3.swf"}, 
  20.                                          "controls":{"backgroundColor":"#000000","backgroundGradient":"low"} 
  21.                                  }, 
  22.                                  "clip":{ 
  23.                                          "provider":"pseudo", 
  24.                                          "url":"http://www.mysite.com/myMovie.flv", 
  25.                                          "autoBuffering":true, 
  26.                                          "autoPlay":false 
  27.                                  }, 
  28.                                  "playlist":[{ 
  29.                                          "provider":"pseudo", 
  30.                                          "url":"http://www.mysite.com/myMovie.flv" 
  31.                                  }] 
  32.                          }' /> 
  33.  </object> 

 

Category: Hypertext Markup Language :: Article: 247

Comments

Not rated
Jo
0
Jo
9 years ago
Thanks for this awesome script!

If I want to use my own player (e.g. player.swf) instead of the flowplayer one given (http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf), I should replace this URL with my URL, correct?

What would I use in this section (i.e. instead of flowplayer.pseudostreaming-3.1.3.swf?

config={
"plugins":{
"pseudo":{"url":"flowplayer.pseudostreaming-3.1.3.swf"},
"controls":{"backgroundColor":"#000000","backgroundGradient":"low"}
},

Thanks in anticipation!
Like Like
Reply | Reply with quote | Quote
Bryan
0
Bryan
9 years ago
The second script for click to play only seems so work in Firefox. I placed it on my wordpress site and it worked great, in Firefox, but then tried the page in Chrome, Opera and IE but and it didn't work in those..

Doesn't bother me, the auto play script will do fine, it's nice not having to rely on youtube for my videos, thank you for the script.
Like Like
Reply | Reply with quote | Quote
Ov Moros
0
Ov Moros
10 years ago
Many thanks to you for providing this script. I wanted to stay away from the CONGLOMO-TUBES™ with some video shoots of the band we don't want to make public yet so we can critique them before release. Your script did the trick.

Cheers!
Like Like
Reply | Reply with quote | Quote
Ray Barclay
2
Ray Barclay
12 years ago
Great code.
How can I make it auto repeat
Like Like
Reply | Reply with quote | Quote
Kevin
0
Kevin
14 years ago
This is just what I needed. Thanks for taking the time to post this. Greatly appreciated.
Like Like
Reply | Reply with quote | Quote
hdwebplayer
0
hdwebplayer
14 years ago
Thanks for taking time to share this...
Like Like
Reply | Reply with quote | Quote

Add comment

Your rating:

Submit

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

Accreditation

Badge - Zoho Creator Certified Developer Associate
Badge - Zoho Deluge Certified Developer
Badge - Certified Zoho CRM Developer

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF

Please publish modules in offcanvas position.