Put a VR object into an iframe and it works fine. Add a margin to the skin (for instance so the object can be on the right and controls on the left) and it works fine on desktop but on iDevices the object gets strangely offset. In the example below I places an object with a 255px width on a skin with a 330px width. It automatically centers. The skin has a gray background so this is easier to see. The version on the right has a 75px margin added to the left. On a desktop browser this simply offsets the object so it is snug to the right edge. But viewed on an iDevice and it shifts much farther to the right. However, this only happens if the object is on a "fullscreen" page (100% x 100%), not if the page has set dimensions.
What I think is happening:
O2VR sees that it is on a "fullscreen" page and therefor must compute where to place the object dynamically based on the window width. It can't simply set left and right margins to auto. On desktop it uses the iframe width which is the O2VR page's width within the iframe. But on iDevices it uses the parent page's width or possibly the viewport width so the object gets placed much further to the right.
This sucks.
Problems with HTML5 O2VR in iframes on mobile
-
- Posts: 96
- Joined: Wed Aug 29, 2007 9:33 pm
- Location: Milwaukee, USA
- Contact:
Scott Witte
http://www.tourdeforce360.com
http://www.tourdeforce360.com
Hello Scott,
thanks for the bug report, I will look into this. I hope I can find a work around for this iOS bug. Issue #1111
thanks for the bug report, I will look into this. I hope I can find a work around for this iOS bug. Issue #1111
MfG, Thomas