Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created January 12, 2023 17:58
Show Gist options
  • Save recursivecodes/9cfcf6b2b1604f42e431302733162c54 to your computer and use it in GitHub Desktop.
Save recursivecodes/9cfcf6b2b1604f42e431302733162c54 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<title>IVS Playback</title>
<script src="https://player.live-video.net/1.14.0/amazon-ivs-player.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
// set stream url
const streamUrl = '[Playback URL]';
// init and play
const ivsPlayer = IVSPlayer.create();
ivsPlayer.attachHTMLVideoElement(document.getElementById('video-player'));
ivsPlayer.load(streamUrl);
ivsPlayer.play();
});
</script>
</head>
<body>
<video id="video-player" style="height: 450px; width: 800px;" controls autoplay muted></video>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment