Dynamic configuration change file - xml

Having trouble getting started? The viewer isn't loading properly?
ladyginpro
Posts: 1
Joined: Thu Apr 11, 2019 11:46 pm
Contact:

Dynamic configuration change file - xml

Postby ladyginpro » Fri Apr 12, 2019 12:03 am

Is it possible to use, as an argument to configFileURL, not a link, but an xml file?

For example: I need to change the parameters of the config file on the fly, and I can get the standard config file and change it with js, and then I need to update the player to change the parameters I need.

Is it even possible?

WebSupport
Posts: 975
Joined: Thu Aug 23, 2012 11:35 am
Location: Pasadena, CA
Contact:

Re: Dynamic configuration change file - xml

Postby WebSupport » Fri Apr 12, 2019 6:36 am

This would usually be done on the server such that either when the page is loading or upon some ajax request your server code can generate an xml file on the fly as needed. And then the viewer script simply points to the generated xml as usual.

PS: because we always require a URL of the xml file, it's unlikely that you would be able to modify the xml in javascript in a browser.

Quincy
Posts: 1
Joined: Fri Oct 11, 2019 12:30 am
Contact:

Re: Dynamic configuration change file - xml

Postby Quincy » Sat Oct 12, 2019 1:42 am

Does the server automatically generate the xml files in a case like this?

WebSupport
Posts: 975
Joined: Thu Aug 23, 2012 11:35 am
Location: Pasadena, CA
Contact:

Re: Dynamic configuration change file - xml

Postby WebSupport » Sat Oct 12, 2019 10:14 pm

Our core viewer product doesn't include a sever component (although we recently launched a hosting platform for webrotate 360 product views - PixRiot).

Surprisingly, we also recently added a new API callback that gives you access to all xml config settings in JavaScript after xml is loaded by the viewer and before the settings are applied to any viewer UI, so you can now modify the config in browser according to some custom logic. Let us know if you need this update now as it will be probably a couple of weeks before it's released as a new 3.6.4 build.


Return to “Setup Issues and Embedding”

cron