Oprtions for External Interfacing with API
Posted: Thu Apr 29, 2021 8:57 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
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