Skip to content

Demo

A live player, driven by the SDK on this very page. Press the buttons to call the player's methods, and watch what it reports back – or use the player's own controls and see the events arrive.

Want to try it with your own video or audio? Paste a Media ID below and press Load. Add a Player ID too if you want a specific player configuration – otherwise the default one is used. Environment is automatically retrieved from Media ID.

The code behind it

js
import { JetstreamPlayer } from '@hopecloud/jetstream-player';

const player = new JetstreamPlayer('#player', {
  mediaId: 'jsv:ZmgpAl0l9G5',
  width: '100%',
  height: '360px',
  events: {
    play: () => console.log('play'),
    pause: () => console.log('pause'),
    timeupdate: (seconds) => console.log('now at', seconds),
  },
});

// wire these to your own buttons
player.play();
player.pause();
player.seekTo(30);

// and ask questions
const duration = await player.getDuration();