Sie sind nicht angemeldet.

jordi

Fortgeschrittener

  • »jordi« ist der Autor dieses Themas

Beiträge: 373

Wohnort: Barcelona

  • Nachricht senden

1

Freitag, 6. Oktober 2017, 15:57

iOS issue with CORS using amazon S3

Hi, I'm having trouble using an Amazon S3 bucket, when I'm viewing the project from iOS device, not all images are loaded, panos are always loaded, but rest of the images are not, like thumbs, ... is anyone knowing how to solve this, I guess it was about the policy of CORS, but I already did try different settings without success, on android devices it's working like a charm... Thanks in advance
visita3d.com advanced virtual tours
a new way to communicate

2

Freitag, 6. Oktober 2017, 20:08

Hi,

iOS has an caching bug related to CORS requests in some cases.

The layer and css3d-hotspot images that will be sown on the screen are loaded by the browser by its own (as css-background image) - and that will be done by the browser always WITHOUT a 'crossOrigin' setting - while the krpano js-script needs to load the images WITH a 'crossOrigin' setting to get access to it's pixel sizes.

And iOS is buggy here - it caches the images without the crossOrigin setting, but then when loading from the cache and trying the access the problem happens. Correct working browsers don't have that problem.

A 'workaround' could be adding '?nocache=%$random%' to the image urls to disable the caching, then it should but with disabled caching = slower loading of course.

For iOS it would be generally a good recommendation trying to avoid any cross-origin access, e.g. cross-origin video isn't working too in iOS.

Best regards,
Klaus

3

Freitag, 6. Oktober 2017, 23:31

Hi Jordi,

I too had that issue back in August

https://krpano.com/forum/wbb/index.php?p…72367#post72367

In the end I could only get the thumbnails to show by leaving them with the tour and not up on S3 with the pano tiles.

I had the panos folder as normal with the tour on the regular website hosting plus all the tile folders inside but each of those only contained the thumb.jpg

The url in the scene xml was

thumburl="panos/001.tiles/thumb.jpg"



Then for the pano

Quellcode

1
2
3
4
5
6
7
8
		<preview url="path-to-my-S3-bucket/panos/001.tiles/preview.jpg" />

		<image>
			<cube url="path-to-my-S3-bucket/panos/001.tiles/pano_%s.jpg" />
			<mobile>
				<cube url="path-to-my-S3-bucket/panos/001.tiles/mobile_%s.jpg" />
			</mobile>
		</image>




I used the code supplied by Klaus ( '?nocache=%$random%' ) for the 20 image galleries that I had in the tour as they too wouldn't display the images like the thumbnail issue but I needed these in the S3 bucket and not on the hosting so will have to make do with the no cache.

Hope that helps.



Andrew

jordi

Fortgeschrittener

  • »jordi« ist der Autor dieses Themas

Beiträge: 373

Wohnort: Barcelona

  • Nachricht senden

4

Samstag, 7. Oktober 2017, 12:17

Thanks Klaus,

I have successfully implemented that in the code and now it's working properly everywhere.

was not only in iOS but also on Safari...
visita3d.com advanced virtual tours
a new way to communicate