How to embed facebook video and autoplay?

I tried to embed a facebook video and was struggling to change parameter for making the video autplay.
Tried many things and stackoverflow and other links was not solving it.
Then the hacker in me rose :P, here is the solution how you can embed a facebook video and change different parameters.
Dependency: You must install firfox and firebug to easy copy paste html and hack it 🙂

1. first find the vide link from the normal facebook embed code
for example an embed code is like this:

2. grab the src link https://www.facebook.com/video/embed?video_id=xxxxxxxx and open in firefox
now start the firebug and try looking into the html section
inside some div you will see embed code like this
embed width=”100%” height=”100%”
\<flashvars=”params=%7B%22autoplay%22%3Atrue%2C%22autorewind%22%3Atrue%2C%22default_hd%22%3Atrue%2C%22dtsg%22%3A%22AQC-lmZ9%22%2C%22embedded%22%3Atrue%2C%22permalink_url%22%3A%22http%3A%5C%2F%5C%2Fwww.facebook.com%5C%2Fphoto.php%3Fv%3D10151571479714046%22%2C%22source%22%3A%22embedded%22%2C%22start_index%22%3A0%2C%22start_muted%22%3Afalse%2C%22video_data%22%3A%5B%7B%22hd_src%22%3A%22https%3A%5C%2F%5C%2Ffbcdn-video-a.akamaihd.net%5C%2Fcfs-ak-ash4%5C%2Fv%5C%2F238242%5C%2F429%5C%2F10151571479714046_64249.mp4%3Foh%3De710a05e6453d2c677982a4839423623%26oe%3D51AA2B86%26__gda__%3D1370105465_e3f873619c5b222c02ba06c7138dfdd9%22%2C%22index%22%3A0%2C%22rotation%22%3A0%2C%22sd_src%22%3A%22https%3A%5C%2F%5C%2Ffbcdn-video-a.akamaihd.net%5C%2Fcfs-ak-ash4%5C%2Fv%5C%2F239627%5C%2F429%5C%2F10151571479714046_32827.mp4%3Foh%3Df7d3d98c5fea1cbd414c87ef7c89d01d%26oe%3D51AA2A80%26__gda__%3D1370107167_1d98e2119b96b5d04ab5efa667da6939%22%2C%22thumbnail_src%22%3A%22https%3A%5C%2F%5C%2Ffbcdn-vthumb-a.akamaihd.net%5C%2Fhvthumb-ak-ash4%5C%2F409924_10151571489079046_10151571479714046_38916_870_b.jpg%22%2C%22video_duration%22%3A16%2C%22video_id%22%3A%2210151571479714046%22%7D%5D%2C%22min_progress_update%22%3A300%7D&user=0&log=no&div_id=id_51aa0c74355126771516699&swf_id=swf_id_51aa0c74355126771516699&browser=Firefox+21.0&tracking_domain=https%3A%2F%2Fpixel.facebook.com&post_form_id=&string_table=https%3A%2F%2Fs-static.ak.facebook.com%2Fflash_strings.php%2Ft95145%2Fen_US” wmode=”opaque” scale=”noscale” salign=”tl” allowscriptaccess=”always” allowfullscreen=”true” quality=”high” bgcolor=”#000000″ name=”swf_id_51aa0c74355126771516699″ id=”swf_id_51aa0c74355126771516699″ style=”display: block;width:365px;height:205px;” src=”https://fbstatic-a.akamaihd.net/rsrc.php/v1/yE/r/QIsVb0PNxwO.swf&#8221; type=”application/x-shockwave-flash”\>

there you will see autoplay%22%3Afalse
change that to true and the video will autoplay
3. you can also change the height and width of video to any size by just changing style property you can even use any css class on it 🙂

so guys its not rocket science not sure why I could not find this in google. posting here if it helps somebody and saves some time 🙂

Advertisements
About

Work is fun!

Tagged with: , , , , , , , , , ,
Posted in Uncategorized
4 comments on “How to embed facebook video and autoplay?
  1. […] arises more difficulty with embedding facebook video and autoplaying them. Here I have got a solution for it. What I was expecting it is more than […]

  2. tareqalam says:

    actually it dosent work correctly as facebook changes its source of video file, so i am sorry guys its just facebook business starategy that they wont allow smooth embed of video in order to stop people from going away from facebook … but think its time to become a bit more open about it like youtube.
    thanks and sorry if I have disappointed someone 😦

  3. I only scrolled down to say thanks a million, as iv been banging my head on my desk the past few days trying to figure out how to do this. and now I feel like shooting myself, is there no other way?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Disclaimer
All content provided on this "tareqalam.com" blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner of [tareqalam.wordpress.com] will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
June 2013
M T W T F S S
« May   Jul »
 12
3456789
10111213141516
17181920212223
24252627282930

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 23 other followers

%d bloggers like this: