Use setupPlayerAsync. setupPlayer is legacy and exists only for backward compatibility.
Partner/Confluence copy: .docs/client-setup.md.
npm install @streaming/avvpl-agamo
import { setupPlayerAsync } from "@streaming/avvpl-agamo";
import "@streaming/avvpl-agamo/style";
const player = await setupPlayerAsync({
id: "playercontainer",
playerLicenceKey: "YOUR_LICENCE_KEY",
});
player.load("https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8");
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://avplayer.sportradar.com/agamo/latest/avvpl-player.js"></script>
<link rel="stylesheet" type="text/css" href="https://avplayer.sportradar.com/agamo/latest/avvpl-player.css">
<title>Demo</title>
<style>
body {
margin: 0;
padding: 0;
}
#playercontainer {
position: relative;
width: 100%;
height: 100%;
border: 1px solid black;
}
</style>
</head>
<body>
<div id="playercontainer"></div>
<script>
const config = {
id: "playercontainer",
playerLicenceKey: "YOUR_LICENCE_KEY",
};
avvpl.setupPlayerAsync(config)
.then((player) => {
player.load("https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8");
})
.catch((error) => {
console.error("Player setup failed:", error.message);
});
</script>
</body>
</html>
setupPlayerDo not use this in new integrations. It returns a proxy immediately and does not reject on licence failure. See .docs/client-setup.md.