Friday, September 9, 2011

Hack: Embed -> Embedding Disabled Youtube Videos

Youtube videos could be embedded in a blog or a webpage using the embed code provided by Youtube or by using a direct URL. That is easy but users might disable the option of embedding when they upload their videos. While playing with Youtube source, came across this method of embedding videos even after the disable option in on.

Youtube updated their swf player and this hack no longer works. Hope this post helped them to fix the error.

You should hear music playing, that is from the video below. If it is disturbing pause it before you read the rest of the post.

For the video below embedding has been disabled:



If you try to play the above video an embedding disabled message will be presented. So using the hack the same video could be embedded as follows:



The following is the code used for first video player:


<object data="http://www.youtube.com/v/XS088Opj9o0" style="height: 366px; width: 450px;" type="application/x-shockwave-flash"> <param name="movie" value="http://www.youtube.com/v/XS088Opj9o0" /></object>



The following is the code used for second video player:


<div id="watch-player" class="flash-player">
<embed type="application/x-shockwave-flash"     src="http://s.ytimg.com/yt/swfbin/watch_as3-vflq6Rm_x.swf" width="450" id="movie_player" height="366"   
flashvars="video_id=XS088Opj9o0&vq=auto&sffb=True&instream=True&autohide=0" allowscriptaccess="always" allowfullscreen="false" bgcolor="#000000">
</div>


The only but huge downside of this method is by default auto play is on and I couldn't find a way to turn it off.

UPDATE: Use the below code to disable auto play in second video player->

<div id="watch-player" class="flash-player">
<embed type="application/x-shockwave-flash"     src="http://s.ytimg.com/yt/swfbin/watch_as3-
vflq6Rm_x.swf?video_id=XS088Opj9o0&allowfullscreen=%22false%22&autohide=0&autoplay=%22false%22"
width="450" id="movie_player" height="366" >
</div>
The result is a non embeddable video with auto play disabled as shown below:



This method is only for educational purposes and Neither I endorse nor encourage any one to use this method for copyright infringement and other restrictive activities.

1 comment:

  1. Hi Annaya,

    How r u? Gud to see ur blog active and with much informative posts.

    How is life? No contact all these days... ur yahoo (buddy4everyone) is deactivated. Was looking for you. Well, gud to see u on linkedin. Please share your contact details.

    With regards and best wishes,
    Srikanth Gadwal (gsk231@gmail.com).

    ReplyDelete

Total Pageviews