steren / stereo-img

web component to display stereographic pictures on web pages, with VR support
https://stereo-img.steren.fr
Apache License 2.0
22 stars 6 forks source link

Better handling of images not served over HTTPS #49

Open azw413 opened 2 weeks ago

azw413 commented 2 weeks ago

I've tried a few SBS 3D images and I always get the same result: views fine in non-VR mode but the 'Enter VR' mode doesn't seem to enter the WebXR mode and instead just displays a binocular stereo view with image data only in the left eye, which does respond to headset movement but the right eye is empty and it just doesn't enter the WebXR view so there's no 3D visualisation. Here's two examples, one a VR180 fisheye SBS image from a Insta360 Evo and a non VR-180 3d image from a Sony Bloggie 3d camera. Example code :-

<stereo-img src="media/bloggie.jpg" wiggle="false"></stereo-img>

20200207_194652_700

bloggie

steren commented 2 weeks ago

Thanks, what browser are you using ?

azw413 commented 2 weeks ago

It's Wolvic on HTC Vive Flow. Your Qoocam and Lenovo Mirage VR180 images render fine in WebXR mode on that device. I'll retest on the Meta Browser and Wolvic on Oculus Quest and report back.

azw413 commented 2 weeks ago

On Oculus Quest: Your Lenovo Mirage image displays correctly in both MetaBrowser and Wolvic. The SBS 3D image 'bloggie' above, behaves the same as the above description on Wolvic and on MetaBrowser, it says 'VR Mode not available' on the button. My thoughts are that SBS images are just not triggering the WebXR scene for some reason. Thanks

azw413 commented 2 weeks ago

I figured it out, it only works if served over a HTTPS connection! Strangely though your Lenovo Mirage image worked fine over HTTP. No idea why that may be but I only discovered it when looking for alternatives using AFrame and there it mandated HTTPS. So there's no bug, just a limitation that people need to be aware of. Thanks!

steren commented 2 weeks ago

Thanks for sharing.

I think I could print a clear warning in the dev console if the image isn't served from HTTPS

steren commented 2 days ago

TODO: ensure proper error messages (at least in the console) when the image cannot be parsed because not served over HTTPS