Getting Started
The library has been configured to work in multiple environments:
  • UMD (Browser)
  • ESM (Client-side applications)

UMD (Browser)

1
<script src="https://unpkg.com/@xapi/cmi5"><script>
2
3
<script type="text/javascript">
4
// Create Cmi5 instance
5
const cmi5 = new Cmi5();
6
7
// Initialize AU
8
cmi5.initialize();
9
<script>
Copied!

ES module (Client-side applications)

For client-side applications built using imports, an ES Module is available for you to install and import into your project.
1
npm i @xapi/cmi5 --save
Copied!
1
import Cmi5 from "@xapi/cmi5";
2
3
// Create Cmi5 instance
4
const cmi5: Cmi5 = new Cmi5();
5
6
// Initialize AU
7
cmi5.initialize();
Copied!
Last modified 8mo ago