When using ORBITVU SUN embed codes it is possible to fine tune generated code to suit your needs. This might be necessary in some cases, e.g. when trying to embed the same presentation multiple times on a single page or if you want to dynamically load/inject presentation using JavaScript.
Embed code components
There are two elements to consider
Container element of the presentation and it's id
This is the element that presentation will be inserted into. Usually, it is a div element that you have to place somewhere on your page. Default id of container element is:
ovContent-<UID>
like:
You might want to use your own id instead of the default one.
JavaScript function used to inject presentation
The default name of inject function is:
inject_viewer_<UID>
If using the same presentation multiple times on single page you must have this name unique for each presentation. You might also want to have the inject function called on demand, not immediately on page load.
Using parameters
ORBITVU VIEWER parameters can be applied to JavaScript code or to embed code/preview code URLs from ORBITVU SUN.
An Example of adding viewer_uid=myuid parameter:
Available parameters
Below you'll find a list of available parameters
viewer_uid
You can change default value of container id and inject function name (JavaScript) by setting new UID
Default: <UID> - uid of ORBITVU SUN presentation
Value: string that is both valid JavaScript function name and HTML id attribute
If you set this parameter to myuid the name of the inject function will be: inject_viewer_myuid and id of the referenced container element will be ovContent-myuid. You have to change id of the container element in your HTML code.
viewer_delayed
If you want to delay the moment presentation is injected into the page then you can set viewer_delayed to yes and then call inject function by yourself when you need. The default name of the inject function is: inject_viewer_<UID>, but can be changed with viewer_uid parameter.
Values: yes | no
Default: no