0

What i am trying to do is to use a photosphere on my website so that it shows up on full screen as a website cover page. The problem is the the code to embed a photosphere in a webpage given here by google

https://developers.google.com/photo-sphere/web/

lets only the photosphere size to be hardcoded as

displaysize="600,400"

what ever the values but its still hardcoded. What i want is that it gets adjusted to the screen of the user and gets displayed in the whole browser window. Any one got an idea how to pull it off? I didn't find any stuff about 'photosphere on web' other than the google link i gave above.

3 Answers3

0

Indeed the API is currently designed to take static values. I think it's a good point that users might want to set the dimensions to 100% and let it resize dynamically.

I put it on the TODO list and will try to get to it shortly.

In the meantime, one work around is the following: After the viewer loads you will find an iframe on the page which contains it. You can change it's dimensions dynamically to your liking and the viewer should adapt.

Sascha
  • 86
  • 5
0

The API provided by Google wraps the whole photosphere in layers of iFrames. You can use the API to request a certain photosphere but only use the response to parse it for the values you need. Then you create your own request and the result can be shown fullscreen.

An example link is this I created this link dynamically from the JSON response from the elements media$group media$content 0 url

Hope it helps.

0

Can't you take the raw image and just use webgl to project it on the inside of a sphere?

Eric G
  • 11