Table of Contents


I have often seen people trying to use audio or video files in SharePoint sites. In this article I provide two methods to embed videos, first from YouTube and secondly from a document library.


1.       To use any YouTube video which then opens in a browser. You will get an option to share as shown

2. Now once you click on this share you will get another option panel there you select Embed. It will now look like this:

In this screen the main part of your use is the code shown in the panel. You can customize it based on your needs. You can see that the width and height is specified , however you can change it to your values by entering these values in the textboxes shown at the end. In another way you can select some standard size as well. By selecting these code shown will change accordingly. You have checkboxes available as well to use the video as per your need and with every selection the code will keep on changing. Now we are ready to use it in a or site.

3. Go to your SharePoint 2007 site and then on the page where you want to show this video.

4. Edit
your page and add a content editor webpart. Edit this webpart and then add this code in source editor. 
That’s all your page is ready with this video. It will look something like this

Now it is the time to use your videos, stored in your document libraries. Follow these steps:

1. First of all upload the file in your document library. Once uploaded right click on it and select copy link as shown belo

2. Now open the page where you want to display this video. Edit this page and add a content editor webpart. Add this script in text editor:
1.<div align="center">
2.<embed src="YourUrlHere" autoplay="true" width="250" height="200" loop="false">

You just need to replace the YourUrlHere. All values are self explanatory except loop. If you mark it as true it will keep on playing one after one.

Now just check in this page and it is ready for you now.

I hope this will help you out.
Rahul Rashu