Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosen up height and width requirement or define a new type #557

Open
amimas opened this issue Jun 15, 2021 · 3 comments
Open

Loosen up height and width requirement or define a new type #557

amimas opened this issue Jun 15, 2021 · 3 comments

Comments

@amimas
Copy link

amimas commented Jun 15, 2021

I'm working on building a plugin for a markdown parser. The idea is that an URL from a provider will automatically be replaced with appropriate contents from the provider, when the markdown file is parsed and converted into a static html file.

According to oEmbed spec, the rich media type embeds must have a height and width set. However, twitter doesn't follow that requirement from the spec.

https://developer.twitter.com/en/docs/twitter-for-websites/oembed-api

I'd love to follow the spec but it's difficult to do that when providers do not respect the spec. Not sure if this was brought to your attention or not. I can understand that it is difficult for twitter to set a constrained height and width. It seems Drupal already decided to loosen the validation of provider response:

Does it make sense to loosen the requirement in the spec about height and width for rich type responses? In general, rich type embed response is very broad topic. As you can see in the above example, sometimes these requirements are not feasible.

Or, should there be a completely new "type" defined?

@kylebrowning
Copy link

For native mobile embeds not having the width and the height wreaks havoc fast performing scroll views.

@ChristopherMatthews
Copy link
Contributor

Soundcloud also does not follow the height and width requirement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@kylebrowning @amimas @ChristopherMatthews and others