Forum Discussion
williamdw
Feb 24, 2022Copper Contributor
Embedding Stream videos outside Office environment
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...
Marc Mroz
Microsoft
Feb 25, 2022We 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
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