Skip to content

Installation

Which flow to choose?

  • If you use a bundler (Webpack, Rollup, Vite), choose With NPM. This version supports all browsers.
  • Otherwise, choose a CDN :
    • If you do not need to support Internet Explorer 11, we recommend to use via CDN (ESM).
    • Otherwise, choose Via CDN (UMD)
  1. Install the library into your project

    Terminal window
    npm install @enghouse-qumu/player-sdk
  2. Add your iframe on the HTML page

    <iframe src="<url-to-presentation>" frameborder="0"></iframe>
  3. Add the logic to your application

    import { PlayerSdk } from '@enghouse-qumu/player-sdk';
    const iframe = document.querySelector('iframe');
    const sdk = new PlayerSdk(iframe);
    sdk.addEventListener('timeupdate', (newTime) => {
    console.log('timeupdate', newTime);
    });
    sdk.getDuration().then((duration) => {
    console.log('duration', duration);
    });
    sdk.play();

TypeScript support

This library supports TypeScript by default.