SOLVED

Unable to embed videos on SharePoint pages

Brass Contributor


I have a "Media Hosting" document library where we've previously uploaded mp4 videos to.
In the past, I've been able to copy the link from a video in that libary and embed into a SharePoint page using the code below:

<iframe width="853" height="480" src="https://centercalprop.sharepoint.com/:v:/g/ESnalN_wX91ArNtIxxoZygUBNfSoHe75Z_MyAs3xMy-iMQ?e=GFInud"></iframe>

Hi all, as of a couple weeks ago (it seems very recent), I am receiving connections errors when attempting to embed videos in the Embed webpart on SharePoint pages:

 

2022-09-20_10-27-52.png

 


I've tried adding centercalprop.sharepoint.com and microsoftstream.com as allowed Domains under Site Settings > Site Collection Administration > HTML Field Security, but no change. I also updated the setting to allow ALL domains, no change (waited 24 hours before trying again).

I also tried embedding the same way but by using a random video from YouTube.com and have the same issue: "www.youtube.com refused to connect." What am I doing wrong?

 

Thank you in advance,

Morghan

6 Replies

Hello @mdcastorena 

 

i have to tried embed a video stored on sharepoint with the embed web part and the following code:

<iframe width="853" height="480" src="https://<TENANT>.sharepoint.com/sites/MediaStore/Video/CT%20E-Mail%20Vorlage.mp4"></iframe>

 

and a video from youtube with the ootb youtube web part and the embed code:

https://www.youtube.com/watch?v=5z7n5UCSwO8

 

Information about the youtube web part:

https://support.microsoft.com/en-us/office/use-the-youtube-web-part-c14fa2c1-71dc-4e52-94b6-b4876742...

 

Both works fine.

 

Regards, Dave

I tested on our site, and was suprised to find out that were are experiencing the same. There is no problem embedding youtube, but embedding a video from a sharepoint document library results in the "refused to connect" (seems to be related to the link?).

But if I use the "file viewer" web part then I can link to a video in a document library and it works.

@MiaPil How you are getting link to video in document library? Try following the steps given in my answer to get the direct link to video in document library: Copy Link includes extra characters that won't work 

 

Then use this direct link in embed/iframe code.

 

Also, did you try adding tenant/host list to HTML Field Security Settings in site settings?


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

best response confirmed by mdcastorena (Brass Contributor)
Solution
Hey! it helped with the direct link.

I (and I assume Morghan as well) used the "shared link" and the URL. I could see that it wasn't correct, but just couldn't find where the correct link was. Thank you for sharing the guide!
Yep, that was the issue. When using the direct link, the embed code works fine. That must have been a recent change as it was working before with the share link! Oh well. Thank you for the assistance, all!

@mdcastorena You're welcome, glad it worked for you!

 

I think you accidentally marked Mia's response as best response.


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

1 best response

Accepted Solutions
best response confirmed by mdcastorena (Brass Contributor)
Solution
Hey! it helped with the direct link.

I (and I assume Morghan as well) used the "shared link" and the URL. I could see that it wasn't correct, but just couldn't find where the correct link was. Thank you for sharing the guide!

View solution in original post