Skip to content

jsDelivr viewer

Open the example · JavaScript source

jsDelivr viewer example

This is the basic viewer with the SDK and engine served by jsDelivr. Your site still hosts its own HTML, application code, and .webex scenes.

<script src="https://cdn.jsdelivr.net/gh/randomcontrol/webex-viewer@v3.0.0/webex-viewer.js"></script>
<script src="./js/app.js"></script>

The SDK locates the matching engine JavaScript, WASM, and data files beside itself. Pin an immutable release tag and load every runtime file from that same tag. Never use latest and never combine old webex-viewer-module.js pages with the current SDK.

Application code is otherwise identical to a self-hosted integration:

const viewer = await WebexViewer.mount({
  container: '#viewer',
  apiKey: 'ak_xxxxxxxxxxxxxxxx',
  scene: './scenes/scene.webex'
});

Use self-hosting when your security policy disallows third-party scripts or you need full control over caching. Use jsDelivr for the shortest initial setup.