Open andrade94 opened 8 years ago
Make it a separate page and use an <iframe>
. This is how the standalone version works (as well as things like YouTube embeds).
So I should use the standalone.js too? and the API things I have for my tour should be done in that html pannellum.htm? How will the iframe change if I'm using the API to build a tour?
</iframe width="480" height="390" allowfullscreen style="border-style:none;" src="../src/standalone/pannellum.htm?panorama=../../examples/examplepano.jpg&title=Jordan%20Pond&author=Matthew%20Petroff&preview=../../examples/examplepano-preview.jpg"></iframe>
No, you shouldn't use standalone.js
if you're using the API. I just mentioned pannellum.htm
as an example of using the Pannellum API in an <iframe>
. The embed code would be something like this: <iframe width="480" height="390" allowfullscreen style="border-style:none;" src="youriframe.html"></iframe>
@mpetroff: So using the iframe approach (standalone.html) is the recommended/best practice approach for putting a panorama on a web page? For frameworks it is also possible to add the pannellum javascripts and the initialization directly (on a DIV element that should hold the pannellum viewer) - this approach may reduce issues with text leaking into search results.
It's the recommend approach if you want to allow other people to embed it, which is what this issue is about. For other use cases, it depends. The <iframe>
approach is slightly simpler, while the API allows a lot more flexibility.
Is there a way for me to host the tour in my webpage that was created with the API and create an embedded link for me to embed it on another person's webpage?