Wowza Community

Is it possible to show multiple custom RTMP streams in 1 HTML page?

Hi,

I tried setting up 2 custom rtmp streams player embed in a single html file. The problem is the second stream is not working in Chrome and Firefox but does work in Safari.

Here is my page

<div id='wowza_player1'></div>
<script id='player_embed' src='stream1.js' type='text/javascript'></script>
<p></p>
<div id='wowza_player2'></div>
<script id='player_embed2' src='stream2.js' type='text/javascript'></script>

I changed the js file code to point to the right playerID and the first player is working.

I get this error in chrome console

WARN: Player "fcplayer" is already initialised. Options will not be applied.

Any ideas?

Thank you

Hello Seb,

You can add more than 1 player to the page, but each player needs to be formatted similar to this:

<html>
<head>
<script type="text/javascript" src="1.0.00.3944/wowzaplayer.min.js"></script>
</head>

<body>

<div id="playerElement" style="width:640; height:480"></div>
<div id="playerElement2" style="width:640; height:480"></div>

<script type="text/javascript">
WowzaPlayer.create('playerElement',
    {
"license":"PTRL1-hyxZU-akB8x-Ju8bz-YZh8c-XXXX",
"title":"Player 1",
"description":"",
"sourceURL":"http://localhost:1935/vod/sample.mp4/playlist.m3u8"
    }
);
WowzaPlayer.create('playerElement2',
    {
"license":"PTRL1-hyxZU-akB8x-Ju8bz-YZh8c-XXXX",
"title":"Player 2",
"description":"",
"sourceURL":"http://localhost:1935/vod/sample.mp4/playlist.m3u8"
    }
);
</script>

</body>
</html>

I hope this helps.

Regards,

Mac

I’m also looking to embed 21 streams on a single webpage, as an event monitoring page for a tech team. I have it roughly working via the first method in this thread (Safari only, all embeds in a single DIV, single column). It’s using a single DIV called “wowza_player”. If I try to rename the other DIVs the players don’t show up. How can I rename the DIVs to allow better formatting on the page? And where does the license # come from?