Customizing ORBITVU SUN embed codes

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. 


There are two main things 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:

    <div id="ovContent-myuid" class="orbitvu-container"></div>

    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.

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:

<script type="text/javascript" src="//orbitvu.co/001/pcFGPQAZSh3mJWrPGezuBP/ov3601/3/script?width=auto&content2=yes&height=auto&viewer_uid=myuid"></script>
<div class="orbitvu-viewer" style="background: url(//static.orbitvu.co/001/pcFGPQAZSh3mJWrPGezuBP/iproc/600/600/img01.png) no-repeat center center #ffffffff;width: 600px; height: 600px">
    <div id="ovContent-myuid" class="orbitvu-container"></div>
</div>

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

custom_viewer

If you have your own VIEWER license, e.g. for a customised VIEWER look, then you can use it with Orbitvu SUN. You have to visit your Orbitvu SUN account preferences and upload your custom VIEWER (zip archive). Since then you can add custom_viewer=yes to embed codes to use your viewer.

Values: yes | no

Default: no