AWS for M&E Blog
Using JW Player with Amazon IVS
Amazon Interactive Video Service (Amazon IVS) helps developers easily build interactive live streaming experiences. It includes a player SDK, which unlocks ultra-low latency streaming across platforms.
We are excited to announce the release of the Amazon IVS JW Player integration. This enables IVS customers to use the IVS player SDK with the added functionality and UI of the JW player web player.
In this post, we cover how to take advantage of these new capabilities.
Step 1 – Load JW Player and the IVS player SDK
Include the JW Player and IVS provider libraries in the HTML <head>:
<script src="JW_PLAYER_LIB"></script>
<!-- Check https://docs.aws.amazon.com/ivs/latest/userguide/IVSPRN.html for the latest asset -->
<script src="IVS_PROVIDER_LIB"></script>
Step 2 – Configure JW Player to use the IVS provider
When you create the JW Player object, use the ivs type on the playlist item to tell JW Player to use the IVS provider. You can also add non-IVS content (DASH for example) to the playlist, and JW Player will switch playback libraries as needed.
jwplayer('JW_PLAYER_DIV').setup({
playlist: [{
file: 'IVS_PLAYBACK_URL',
type: 'ivs'
}]
});
Step 3 – Put it all together
Load this code in your browser, and you are all set! Your JW Player instance is now using the IVS player SDK to power playback. You can fully customize the player to fit your brand while still getting the low latency you expect from IVS.
<head>
<script src="JW_PLAYER_LIB"></script>
<script src="IVS_PROVIDER_LIB"></script>
</head>
<body>
<div id="player"></div>
<script>
const player = jwplayer('player').setup({
playlist: [{
file: 'IVS_PLAYBACK_URL',
type: 'ivs'
}],
autostart: true
});
</script>
</body>
Head over to the Amazon IVS Player: JW Player Integration guide for more detailed information about the API. As always, we are available in the AWS Developer Forums to answer your questions.