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

Add a way to pass iframe options #240

Open
Kikobeats opened this issue Jul 15, 2020 · 2 comments
Open

Add a way to pass iframe options #240

Kikobeats opened this issue Jul 15, 2020 · 2 comments

Comments

@Kikobeats
Copy link
Member

The Microlik API iframe query parameter accepts an object, being that the option to be passed in order to customize the iframe dimensions

{
 "maxwidth": 350,
 "maxheight": 200
}

Need to find an affordable way to pass these option from Microlink SDK to Microlink API

@oyeanuj
Copy link

oyeanuj commented Jul 15, 2020

Hey @Kikobeats, also came here looking for something like this. It has been the only major problem for us while using Microlink, so maybe I can share the problem that we have run into:

When designing for mobile web, or really big screens, we need to be able to control the dimensions while maintaining the aspect ratio or overriding it. So, when previewing videos, like on Youtube or Vimeo: we'd like to default to the aspect ratios that they specify in their oEmbed urls. In those cases, an ability to specify a maxWidth would be great.

Alternatively, do you think for iFrames, there should be a way where the React component takes 100% of the container width and the users just control the container themselves?

Hope this helps!

@Kikobeats
Copy link
Member Author

In general, style an iframe is hard.

This issue should be to address at least the possibility to customize iframe options.

That should help you to adapt the response according to your use case, but it isn't a complete solution because the support of these options depends on the provider

Screenshot 2020-07-15 at 19 56 36

Even we implement an affordable way to pass the iframe parameters through Microlink API, a subset of providers will be not support this customization (and that's ok).

I feel if you want to have granular control over this you need to wrap the embed in another higher component order

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

2 participants