You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, April 3rd 2018, 1:32pm

Doesn't load scene when in krpano is in iframe in hidden tab

Hi!

I have a customer which has our krpano based viewer in an iframe on their homepage.

http://kajkanten-limhamn.com/projekt/styrbord

Sorry it's in swedish, but if you scroll down a little bit and click the link that says "UTSIKTER" you can see where our player is embedded.

What you can see is that krpano doesn't load the scene properly, you can get it working by pressing the button at the bottom and choose a scene.

It works as normal when access directly
https://public.wec360.se/elfutveckling/k…en1/vrleverans/


My question is, how can I make krpano load the scene as normal, even though the iframe is hidden at start?

2

Tuesday, April 3rd 2018, 5:51pm

Hi,

works for me - tested in Firefox and Chrome...

And technically there should be no reason why krpano shouldn't work inside an iframe...

Best regards,
Klaus

Umalo

Professional

Posts: 1,048

Location: Osijek, Croatia, EU

  • Send private message

3

Monday, May 7th 2018, 10:57pm

Issue here is that Krpano somehow can't know its own size while his parent Iframe has no size as hidden.
See example: Link
When called directly it is aware of size as there is no hidden Iframe: Link

Any known workaround to make Krapno aware if size even when Iframe is hidden? *unsure*
Umalo

4

Friday, May 11th 2018, 10:02am

Hi,

sorry, but I don't see the problem...
I have tested your link now in Firefox and Chrome and both work as they should...

What exactly happens in your 'doesn't load the scene properly' case?

Best regards,
Klaus

5

Friday, May 11th 2018, 10:03am

Issue here is that Krpano somehow can't know its own size while his parent Iframe has no size as hidden.
But in this case the viewer doesn't have/get a size from the browser, so 0/0 is the correct size in this case...

Umalo

Professional

Posts: 1,048

Location: Osijek, Croatia, EU

  • Send private message

6

Friday, May 11th 2018, 8:54pm

Hi Klaus. More intense testing on that link would show you the error case. It doesn't happen every time. It depends on how long you waited to click on the button that makes Iframe visible.
As when defined hidden Krpano is starting. There are lot of code behind on autorun="onstart" so it takes some time (menu is automatically generated based on how many scenes project have and many other objects)
So, when code start to use stagewidth or stageheight and their sizes are 0 or NaN (also don't understand why stageheight is NaN) as Iframe hidden it make problems in starting all elements.

I tested startup with checks to determine if Krpano is started in hiddne Iframe (0 NaN) and stop proceeding unit onresize show screensize >0, but I was wondering is there any other better workaround to somehow stop Krpano to start while in hidden Iframe? Somehow autorun="onstart" not to be triggered until there is known Stage size?

Do you understand the issue now? If you click on button Link very fast you will see that onstart action show some size as there is a size if the iframe. It is understandable that Krpano don't know if as its "parent" Iframe actualy don't have its own size but I was expecting Krpano not to trigger onstart or preint actions while in limbo. It cound be kind of improvement proposal as why would Krpano start when display area not visible or defined.
Cheers *unsure*

7

Monday, November 19th 2018, 1:58pm

Hi,

works for me - tested in Firefox and Chrome...

And technically there should be no reason why krpano shouldn't work inside an iframe...

Best regards,
Klaus
Hello Klaus,
I have a question, you may be able to help.


When an iframe is below the visible content of a webpage and I scroll to it, it stays back, loading!!!, unless I scroll really fast when page is loading or I refresh the page for it to show. when they are on the visible part they always load.

This happen in Mac, and Iphone and Tablets, Chrome and Safari sometimes but not on firefox. My webmaster tells me in windows works fine so he could not find the problem.

Look at this video sample:

https://youtu.be/ko6exp49z5Y


Web: vrartgaleryny.com

If you have any suggestion would be of help.
Thank You
Best
Erwin List