Note: Not a live demo, server configuration is just for example. For live working example try the Millicast Publisher and Subscriber example. Or AWS Kinesis Publisher and Subscriber example.
<div class="flex w-full h-auto my-auto">
<div id="wowza-conference-1" class=""></div>
</div>
<script type="text/javascript">
var player = jwplayer("wowza-conference-1").setup({
"allowFullscreen": false,
"aspectratio": "16:9",
"playbackRateControls": true,
"plugins": {
"../../js/webrtcconference-8.20.0.js": {
"container": "#conference-container",
"master": true
},
"../../js/webrtcpeakmeter-8.20.0.js": {
"verticalMeter": false
},
"../../js/webrtcpublisher-8.20.0.js": {
"applicationName": "webrtc/room1",
"autoStartDevice": true,
"buttons": false,
"conferenceContainer": "#conference-container",
"conferenceSubscribeHls": false,
"hlsTemplate": "https://{serverURL}/{appName}/{streamName}/playlist.m3u8",
"publishToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3ZWJydGMiLCJpYXQiOjE2MzczMzAyNTksImV4cCI6MTY2ODg2NjI1OSwiYXVkIjoid3d3LmV4YW1wbGUuY29tIiwic3ViIjoianJvY2tldEBleGFtcGxlLmNvbSIsInN0cmVhbU5hbWUiOiJDNkx4Nmt1NkZFWGdLdHQifQ.4_38rdgyqWabGvoV6WZREjrqevVeGIgCKK7xOknwGx4",
"publisher": true,
"seperateScreen": true,
"server": "wowza-conference",
"serverURL": "rtc.electroteque.org"
}
},
"sources": [
{
"appName": "webrtc",
"file": "C6Lx6ku6FEXgKtt",
"live": true,
"publisher": true,
"type": "mp4"
}
],
"title": "Participant 1",
"width": "100%"
});
player.on("ready", function() {
player.on("selectedParticipant", (participant) => {
console.log("selected participant", participant);
}).on("unselectedParticipant", (e, participant) => {
console.log("unselected participant", participant);
}).on("participantleft", (sender) => {
}).on("participantfeatured", (sender) => {
}).on("participantunfeatured", (sender) => {
}).on("leaveroom", e => {
}).on("roomjoinfailed", e => {
}).on("existingparticipants", (sender) => {
});
});
</script>