Let's start with adding player js file from our CDN to head section of our website:
<script src="https://cdn-scripts.stormstreaming.com/stormplayer/5-latest.min.js"></script>
<div id="container"></div>
<script>
// Replace the following placeholders with actual values
// {SERVER_HOST}, {APP_NAME}, {STREAM_KEY}
const streamConfig = {
stream: {
serverList: [{
host: "{SERVER_HOST}",
application: "{APP_NAME}",
port: 80,
ssl: false
}],
sourceList: [
{
streamKey: "{STREAM_KEY}",
},
]
},
settings: {
autoStart: false,
},
};
const playerConfig = {
containerID: "container",
width: "100%",
aspectRatio: "16:9",
title: "My first broadcast",
subtitle: "It's going to be super...",
};
const player = stormPlayer(playerConfig, streamConfig);
</script>