Embedding Stream videos outside Office environment

New Contributor

In Stream (Classic), users have the ability to generate embed (iframe) code. This enables users to embed the videos in environments outside the Office suite - such as in blogs and web sites. As an HE institution, we encourage our instructors to use this feature to embed the videos in their online courses. This is so students do not need to leave the LMS environment to view the videos. Has anyone seen whether or not an embed feature will be added to SharePoint and OneDrive for Business to replace the feature as it exists currently in Stream (Classic)?

9 Replies
We are working on rebuilding this feature for videos on SharePoint and OneDrive. It's not on the roadmap with a date yet but it's in progress.

That being said you can embed a video today using the embed.aspx URL. It will only work if you construct the URL or grab it with an API, and it doesn't automatically login or offer a sign in button if the user doesn't already have floating auth/cookies from M365 in the browser.

But here is a way to construct the embed.aspx URL using a custom doc library view formatting:
https://github.com/pnp/List-Formatting/tree/master/view-samples/get-video-file-embed-code

Or this API:
https://docs.microsoft.com/en-us/graph/api/driveitem-preview?view=graph-rest-1.0

@Marc MrozMany thanks. Everyone here will be relieved to know this is in the works!

Have there been any updates on this? We are trying to embed videos into our external LMS via Stream (Sharepoint) and iframes with no luck. The users gets a flashing login screen but never gets the video. The LMS has SSO via O365. So, you would think the authentication would have already taken place. The strange thing is, if the users goes to the sharepoint document library where the files are store he can see the files. Now he can go back and the video works. What are we missing? We are not using any shared links. The user is in the Sharepoints site visitor group which has read access to the whole site, including all the files.
Are you using the Embed feature that was added in Fall 2022 for videos stored in SharePoint?
https://techcommunity.microsoft.com/t5/microsoft-stream-on-sharepoint/get-embed-code-for-video-in-sh...

@Kevin Crossman  Yes that is where were are getting the iFrame code to use in the LMS. 

I would suggest opening a support case with Microsoft Support on that.
@williamdw , just wondering if you found a resolution for the flashing login screen issue? Our college is experiencing the same thing with Embed code url's for our Sharepoint/Stream videos in our Brightspace LMS. If the user chooses to copy the link and has it open in the LMS in a new window, it works fine. Just the embed code that's giving the flashing login screen error. Any ideas?

@KCormier no I have not. I do have an open Support ticket with Microsoft. They are asking for more information and I have not gotten back to them. I am on vacation this week. The info they asked for makes me think they have no idea (try another computer or network). I will let you know if we figure anything out or get any info from Microsoft.

We seem to have the same issue here.
In the classic stream embedding to our '3rd party intranet' works fine but trough Stream on Sharepoint we get the same flashing screen.

Now I'm no expert on webservers and stuff but I did some research and noticed the cookies for stream classic are being placed when there's embedded video on the page, when I embed trough stream on sharepoint the cookies aren't being placed.
Apparently there is a samesite cookie setting in sharepoint online that is not set to allow cookies to be placed when it's a third party webpage.

As it's in sharepoint online I don't think we're able to change these cookie settings.
I have opened a supportcase with Microsoft last week but did not yet get a response.

For now having people visiting the sharepoint before opening it through an iFrame will give a workaround as the cookies will then be placed.