Requirement: Add a Video to SharePoint Online page
SharePoint Online: How to Add Videos to Modern Page?
Adding video to SharePoint Online pages is a common requirement, and the options available can vary depending on where you want to host the video. There are three ways to add videos to SharePoint Online modern page:
- Add YouTube video to SharePoint Online Page
- Host the video in Microsoft Streams and Embed in SharePoint Online site.
- Use Embed Web Part to Add a Video to SharePoint Online.
Option 1: How to Add YouTube video to SharePoint Online?
To add a video from YouTube to a SharePoint Online page, do the following:
- Navigate to your SharePoint Online modern page where you would like to embed YouTube video.
- Click on “Edit Page” from the top-right corner >> Mouse over and click on the “+” symbol to add a web part to the desired area of the page >> Choose “YouTube” from the web parts list.
- Once the web part has been added to the page, Select and edit the web part properties on the right-hand side of the page and configure options for your YouTube video. Simply copy-paste the YouTube Video link in the web part property.
- Republish the page to commit your changes.
Option 2: Embed Stream video in SharePoint Online
Stream is recommended over storing videos in SharePoint document libraries, as it is optimized for videos experience. You have to upload videos to Stream first, and then you can display them on modern site pages. Here is how to embed Microsoft Stream video to SharePoint Online:
- Login to Microsoft Steam at https://web.microsoftstream.com/ and upload your video.
- Once uploaded, publish the video and then click on “Share” button to get the link to your video.
- Now, go back to the page where you want to display the video. Edit the page and insert “Stream” web part to it, and then insert the link you copied from Stream.
Option 3: Embed video in SharePoint Online Modern Page using Embed Code
With the Embed web part, You can embed videos from YouTube, Microsoft Stream, Video from SharePoint Online Document library, even from any 3rd party sites like Vimeo that supports embed tags! All you have to do is: Obtain the “Embed” code from sites like YouTube, Vimeo, etc. and add it to the SharePoint Online page using the “Embed” web part.
Here is how to get embed code from YouTube: Just right-click on the video and click on “Copy Embed code”
On Vimeo, You can grab the embed code by clicking on the “Share” button:
Microsoft Stream also provides embed code:
You can also embed a video from the SharePoint Online document library:
<iframe width="600" height="400" src="https://crescent.sharepoint.com/Videos/IntroductionToSPFx.mp4" allowfullscreen> </iframe>
Last but not least: You can use the “File Viewer” web part to play a video file from SharePoint Online libraries!