Oprtions for External Interfacing with API

Q&A about the latest versions
Post Reply
chrisR
Posts: 2
Joined: Wed Apr 28, 2021 12:26 pm

Hi,

I have an app (ios/android) that uses a webview to display our pano2vr tours.

What I want to do is be able to use some app interface / UI external to the webview that can know about what is inside the webview/tour and what is being interacted with.

So far, With the API, it seems I can get the list of nodes, and list of hotspots, but I can't get all the data (text, images) directly from them with Javascript API. To do this, I am parsing the xml data file and using the references/ids that I get from the javascript API to get the data. This way I can create in app lists of available content.

I can also manipulate and get the camera angle easily.

One thing I can't figure out how to do right now that I want to acheive is to hijack interaction with hot spots... so that when a user presses a hotspot, I can execute custom behaviour. There doesn't seem to be official events for this and all I can think to do right now is hack the `skin.js` code to fire some custom events that I can respond to.

Is there a official way to insert custom code on interactions in the pano2vr program?

Someone else in my company that doesn't code actually creates the tours so I'm not very familiar with what's possible in the program vs. what needs to be done with code.

Sorry if this is not clear, let me know if I can clarify more.

Thanks!

Chris
chrisR
Posts: 2
Joined: Wed Apr 28, 2021 12:26 pm

So far, it seems the ideal way is to manually edit `skin.js` and add custom events to the relevant areas.

I see you can run javascript in the URL field of the hotspots but it doesnt have access to the data so it's not an option.

Editing `skin.js` isn't ideal because its a little manual and prone to human error / not saveable in the pano2vr project; but it works.
Post Reply