/  5
 
Adding Youtube videos to sharepoint with full screen option.Sharepoint blog posts, strip out html code for security reasons. With web 2.0 whoknows why. So here is a work around.
Step 1)
Find a video on youtube that you want to post, and copy/paste the embedcode into notepad or other text editor. Do not use word, as some of the formattingmay be copied into the Rich Text Editor in sharepoint. Videos from other sites maywork but has not been tested. Code may also need modified for other sites.Here is what our sample code looks like.<object width="425" height="344"><param name="movie"value="http://www.youtube.com/v/W4ZFlfIEBQA;&hl=en;&fs=1"></param><param name="allowFullScreen" value="true"></param><embedsrc="http://www.youtube.com/v/W4ZFlfIEBQA&hl=en&fs=1"type="application/x-shockwave-flash" allowfullscreen="true" width="425"height="344"></embed></object>Looks like confusing, right? To help I have highlighted the code that we need torecode to post onto sharepoint.
Description of the above.
425 = is the width344 = is the heighthttp://www.youtube.com/v/W4ZFlfIEBQA; = is the Video URL&hl=en; = language selection&fs=1; = is full screen (1 enabled / 0 disabled) True = Allow full screen, (True/False) Needs to be true and enabled with aboveNow that we know what the code is, it’s time to reformat for posting into sharepoint.Copy and Paste…ONLYChange
the sections with color
. The only one that isreally needed is what is highlighted in yellow below. Everything else is optional, butmust be included.<div id=youtubeSNBS1align=center>425,355,http://www.youtube.com/v/W4ZFlfIEBQA;&hl=en;&fs=1,true</div>
 
In addition to the above code you will notice youtubeXXXX. This “Div id” the X’s canbe anything you chose. Just make sure youtube is part of the id tag otherwise thescript will not know what todo with the code.&hl=en; and &fs=1; Changes are optional, but is required for posting. This is what needs to be posted in your blog, via the html source. Copy and pastingdirectly into the rich text editor will not work.Add this code to your post via the HTML source icon .Note: you will not be able to click on it, unless you first select the body of the post.Here is a screen shot of the code being added to a blog NEW post.Here is a screen shot of the same post, only being edited.Notice how some of the code has changed and &amp; is added wherever & isadded. This is a glitch in Microsoft software and html conversion. It is
 
unknown why it does it, just know that it does do this, and your code shouldlook similar to the above.
Step 2)
 You have to ways to modify..1)Add this code to the very bottom of default.master for your blog section usinga hidden “Content Editor Webpart”. It will display the video on the mainposts page, but not on the page that shows comments.2)Add the code to the very bottom of your default.master AFTER</body></html>a.Which ever method you decide here is the code. This is what the code should look like when you copy and paste.Additional note: 7/29/08I could not get the code to work when editing default.master for a site. I also had toadd the code to the very bottom of Post.aspx under Posts directory. I am unsurewhy, but think it may be due to heavy modifications.

Share & Embed

More from this user

Add a Comment

Characters: ...

slashieleft a comment

Make sure when copy/pasting that you copy the closing </script> that flowed onto the 2nd sheet.