Storm Player Integration with Storm Streaming Server
The Storm JavaScript Player was designed from the start to work with the Storm Streaming Server.
Below is a simplified integration guide with our player. We encourage you to consult the
complete
documentation for Storm
JavaScript Library and Player here.
Embed Code
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>
Sample HTML/JavaScript Code
<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>
Main Parameters Explanation
{SERVER_HOST} |
Hostname for the Storm Server, or
the Server URL for Storm Cloud. The
latter can be found on the Video
Summary page.
|
{APP_NAME} |
Application name for the Storm Streaming Server. By default, it's called "live".
|
{STREAM_KEY} |
Stream key for the video.
|
Table 1. Main parameters table