Feature Request: iframe in groov

I would like to be able to display another webpage in groov like can be done in PAC Display Pro.

1 Like

Me too. (Very badly me and several customers too).
We have had this on the feature request list since groov 1.0

The devs (back then) said no… Reason is because the iFrame can not scale its content.
It would be the one gadget that would break the ‘groov scales gracefully’.

I see their point.

Thoughts?

I would rather live with a scaling limitation than not having it at all. You have video gadgets and the contents don’t scale and I don’t think anyone would expect the contents of an iframe to scale anyways.

  1. I totally agree, better to have it since it is high demand and let each user deal with the scaling issues.

  2. Every. Single. One. Of my 40 to 50 video gadgets contents scale, so I would love to see how yours don’t!!!

1 Like

Sorry, what I meant by that, are that the video gadgets don’t/can’t scale like all the gadgets in groov that are vector. A 320x240 video source at 1280x960 is going to look bad.

For background, I’m wanting to show some graphing data that can’t be done in groov - I can supply png files to the video gadget from the graphing package, but they don’t look too great when sized larger than the source, particularly any of the fonts. Also, I want them to be interactive.

Ideally I would be able to point an iframe at it and have all the interactive features available as well.

Ah, right, looking good vs not working… Gotcha. Phew.

An iFrame gadget to embed whatever URL we need and let us work the rest out (how to make it look good/work on any screen size we are going to use).
We would also need a ‘refresh’ option on this one, some of the customers want things like weather radar, so it will need to be 'F5’ed at an interval. In your case, you wont need a refresh as your application takes care of that, you want full interactivity… As if the browser were open in groov. (BTW, an iFrame gadget is available in PAC Display Pro).

I will track down the original (now years old) request and see whats what.

Thanks Ben. Yes refresh would be good - there are probably other desirable features users would want: Navigation buttons? URL from a tag?

Check this out - uses the css transform feature to scale iframes:

I’m not sure if I would want this scaling feature enabled all the time though.

@Beno did this ever make any headway? Would love to see this happen.

It’s going to be such a cool feature drop that when it happens, everyone will know < grin >

In the meantime, I’m still using my super clunky workaround of using Node-RED screenshot node to take a screenshot of the website I need in the iFrame every few minutes, then using the Node-RED image node to trim it so we remove the URL bar, etc, and then the file write node to save it to a webserver and then use the Camera gadget in groov View to display it.

Far out… that’s dedicated. The iFrame I want to use is an interactive 3D Model viewer, so unfortunately this won’t work for me. I appreciate it though.

eh, I beg to differ… I have a few iFrames that need to come from a dedicated Windows program, so I just run a small PC that runs the program or even your main PC; it really does not matter that much, and you use the screenshot node vs the webshot node.
Same path after that.
Same 3D model in groov View. You can push the rate as high as your network and PC can sustain.
One frame every 0.5 seconds is not unheard of.

EDIT:. Also, if you are looking at a 3D Windows app vs a website URL, the official groov View iFrame gadget is not going to help you at all (if it ever lands).

EDIT: Oh, re-reading your post for n’th time, I see you want a two-way iFrame… So a browser in a browser.
That, uh, is going to interesting for CORS…

1 Like

Historically, we haven’t tackled this for a few reasons:

  1. All of groov View’s existing widgets are built to resize dynamically. An iframe can do that too, but the contents of the iframe won’t resize appropriately.
  2. On the groov EPIC touchscreen, we have be careful that the iframe can’t put you into a situation where you’re stuck. We can’t let it navigate away from the top-level page, for example.
  3. The on-screen keyboard on groov EPIC won’t work for iframe elements.
  4. Browser security policies on iframe content are pretty strict (for good reason!) and things just kind of break a lot.

As a quick example, I threw together a simple HTML mockup:

https://review.jonathanfischer.net/CssWidgets/iframes.html

The host page has zero JavaScript on it, but it resizes similarly to groov View as you change the browser size. (I had a CSS only experiment lying around that I repurposed for this.) The iframe embeds demo.groov.com. Resizing the page should show the iframe resizing, and the content kind of does, but it’s not super usable.

To get demo.groov.com to load in the iframe at all, I immediately had to allow it to run both scripts (of course) and turn on allow-same-origin, which is specifically called out as a bad idea, don’t do this on the Mozilla Developer Network:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attributes

Even after enabling both of those things, the iframe content loads and you can sign in (username: opto, password: opto22), but then nothing works after that. It fails to load the page index and won’t render anything, and appears to immediately discard cookies which signs you out.

Simple stuff works easily in an iframe, but complex applications run into problems, especially if they need to communicate with a server somewhere. (e.g. you need to sign into them)

Here’s a different example that works better than expected:

https://review.jonathanfischer.net/CssWidgets/iframes-nasa.html

I embedded a NASA demo application:

2 Likes

That NASA iFrame is pretty well exactly what I was hoping to embed for us - by using a Sketchfab.com link. I guess it is more of a browser within a browser situation - I’m clearly not well versed in the iFrame technology. In my case it’s more of a show off feature rather than a production tool.

Here’s an attempt at embedding a Sketchpad model:

http://review.jonathanfischer.net/CssWidgets/iframes-sketchfab.html

It doesn’t work, because it requires both allow-scripts and allow-same-origin to be set, or sandboxing to be turned off entirely, neither of which is something we’d be likely to do.

3 Likes