4 March 2011
Some time you need to add YouTube videos in your SharePoint site pages, it is very simple to implement. I’m going to show step by step how to embed YouTube videos in SharePoint 2010 site, using content editor web part.
1. Go to YouTube video which you want to embed and copy the video embedded code , should be something like this,
<iframe title=”YouTube video player” width=”480″ height=”390″ src=”http://www.youtube.com/embed/CuLxW5sPXhA?rel=0″ frameborder=”0″ allowfullscreen></iframe>
2. Open notepad and past the above code there, and save the file with name something like “videotest.txt”.
3. Go to SharePoint site and open a document library and upload the “videotest.txt” file.
4. Now go to the page where you want to embed the video and add a content editor web part on page.
5. Go to the document library where you already added “videotest.txt” file, right click on file and click on “copy shortcut”.
6. Now go back to the page where you have added the content editor web part, click on web part and select “Edit webpart”.
7. In the “custom link” property paste the “videotest.txt” shortcut value(already copied in step 5)
8. Click Ok.
You can see in the below picture that the YouTube video is embedded in SharePoint page.
Veronique Palmer
I can get the page embedded, but it won’t let me save and exit. I keep getting Javascript errors. Any ideas?
Compact Fluorescent
Thanks for providing such useful information. I really appreciate your professional approach. I would like to thank you for the efforts you made in writing this post. I am hoping the same best work from you in the future as well.
Anonymous
Awesome! You saved ton of my time….
Tummy Tuck
This is a very good job.
Nathan
Why not just use a page viewer? It’ll take half as much time, you just have to remove the iframe controls from the youtube link, and then adjust the height & width of the web part to something that makes sense.
Another point to consider, if you’re using https, youtube can generate an https link for the video as well (so that your SP site users don’t get annoying "do you want to allow unsecure content" popups).
Admin
Yes, agree with you that there are different ways to achieve same result. Also if I change iframe source to https, then I will not get the annoying popup.