Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Extending Embed component!

jezwn
Level 4
Level 4

I was following this git repo for extending the Embed core component. Extension of the Embed component is possible by providing any of the following: 

  • Custom URL Processor
  • Custom oEmbed Configuration
  • Custom embeddable fragment

The custom oEmbed configuration, I tried adding a new config in Core Components oEmbed client with the following values.

 

vimeo.PNG

 

When I try to enter a URL like https://vimeo.com/76979871 I get a message that this URL is not supported and a 404 response in the network tab for that request.

The request URL: http://localhost:4502/content/project_name/_jcr_content/root/container/container/embed.urlProcessor.json?url=https://vimeo.com/7697987

Did I miss something here, could someone help!

 

Also how can use the custom URL processor for vimeo? 

 

 

 

core extension embed component
1 Accepted Solution
Theo_Pendle
Correct answer by
Community Advisor
Community Advisor

Hi @jezwn,

Could this be the issue? 😅 

Selection_159.png

View solution in original post

3 Replies
Theo_Pendle
Correct answer by
Community Advisor
Community Advisor

Hi @jezwn,

Could this be the issue? 😅 

Selection_159.png

View solution in original post

jezwn
Level 4
Level 4

Hi @Theo_Pendle 

That was one thing for sure when I checked now. The other thing was the URL scheme, I changed the scheme from https://vimeo.com/* to https://vimeo.com/.* . I'm quite not sure the significance of this dot.
Thanks

 

Theo_Pendle
Community Advisor
Community Advisor

Hi, I'm happy you found the issue 🙂 the scheme is in regex format, not glob. The dot means "any character" and the star means "0 or more times".

A great site for testing regex expressions is regex101.com 🙂

Also: I from a security perspective I recommend being as restrictive as possible to make sure people can't abuse the URL scheme. I don't recommend using the dot wildcard since that would let people link to http://vimeo.com/whatever-they-want for example 😛 restrict the pattern to allow only video IDs! I'm on my phone right now so it's hard to write regex but try the website I gave you, it has a validator and all the information about regex syntax.