umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.41k stars 2.66k forks source link

Embedding YouTube shorts url doesn't work #13632

Open nul800sebastiaan opened 1 year ago

nul800sebastiaan commented 1 year ago

Discussed in https://github.com/umbraco/Umbraco-CMS/discussions/13630

Originally posted by **Yinzy00** January 3, 2023 Hi, When using shorts url in the umbraco Embed I keep getting the "not supported" error. ### Steps to reproduce 1. Open the embed functionality of rich text editor. 2. Use a youtube.com/shorts/.* url.
nul800sebastiaan commented 1 year ago

@Yinzy00 In this case, it looks like shorts are not supported yet: https://github.com/umbraco/Umbraco-CMS/blob/v11/contrib/src/Umbraco.Core/Media/EmbedProviders/Youtube.cs#L17

This line should probably be changed to public override string[] UrlSchemeRegex => new[] { @"youtu.be/.*", @"youtube.com/watch.*", @"youtube.com/shorts.*" }; - we'd love a little help it you can!

Yinzy00 commented 1 year ago

Hi @nul800sebastiaan ,

Yes I looked in to that code and already created a pr.

https://github.com/umbraco/Umbraco-CMS/pull/13631

Thanks.

nul800sebastiaan commented 1 year ago

Awesome, thanks very much! We'll have a look soon! 👍

TimmiX88 commented 1 year ago

Can this also be backported into Umbraco 8 (the upcoming 8.18.6 release)?

Ambertvu commented 11 months ago

Just made a PR for this for 8.18