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

Simple configuration option to disable html wrap #152

Closed
wants to merge 2 commits into from
Closed

Simple configuration option to disable html wrap #152

wants to merge 2 commits into from

Conversation

actuosus
Copy link

@actuosus actuosus commented Feb 2, 2017

Added configuration to disable wrapping of embed html data.

@iparamonau
Copy link
Member

Thanks. Can you give an example?

@actuosus
Copy link
Author

actuosus commented Feb 2, 2017

You can set CONFIG.R.disableSizeWrapper = true. After that you can get see no wrapping at html key in API response /iframely?refresh=true&url=https%3A%2F%2Fwww.facebook.com%2FJuliusmagic%2Fvideos%2F1178542432223240%2F:

"html": "<iframe src=\"undefined/render?uri=https%3A%2F%2Fwww.facebook.com%2FJuliusmagic%2Fvideos%2F1178542432223240%2F\" frameborder=\"0\" allowfullscreen></iframe>"

@iparamonau
Copy link
Member

Thanks for reminding. Actually, this option isn't used for over 4 yrs now and should be removed altogether. What's your use case for it?

@actuosus
Copy link
Author

actuosus commented Feb 3, 2017

Oh. We have an issue with vertical video from Facebook. Facebook oEmbed API returns improper meta data for vertical video. Iframely wraps the html with 16:9 styling and we have improper layout for the iframe. So I removed wrapping.

Weirdly enough, Facebook oEmbed API page endpoint returns right meta data for width and height.

@iparamonau
Copy link
Member

In that case you make the problem even worse as iFrame will default to something like 300x150.

To fix the problem with FB specifically, you can do two things:

  • skip our renders altogether via SKIP_IFRAMELY_RENDERS: true in your local config,
  • or add iframely.js script to your page. It will adjust the height of rendered iFrames as necessary.

You can see it in action in your local /debug tool when you have the server running.

@iparamonau iparamonau closed this Feb 3, 2017
@actuosus actuosus deleted the selfish branch February 3, 2017 18:56
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

Successfully merging this pull request may close these issues.

None yet

2 participants