Millicast WebRTC Group Call

WebRTC Conferencing for Millicast.

Room Viewer

Note: Not a live demo, server configuration is just for example. For live working example try the Millicast Publisher and Subscriber example.

WebRTC Conferencing configuration for Ant Media Server. Ant Media Server License is required to play back WebRTC. A trial license will work to play back WebRTC. The default WebRTC app for Ant Media Server is WebRTCAppEE.

WebRTC Conferencing configuration for Millicast. The account ID and publish token is required to be configured. A static list of Ice servers is also required. See documentation for obtaining a publish token for the stream setup in the console.

When configuring the publish token subscriber authentication can be selected. A supplied script is supplied to generate the subscriber token with domain restriction. That can be used to configure the subToken config. See the Millicast API Docs for generating these tokens.

Millicast supports WebRTC data channels which can be enabled with dataChannel and channelName

Supplied is a demo WebSocket signalling node server. To provide group room features for Millicast. Within the signal server, this will do a client call to the Millicast API to obtain a subscribe stream. The endpoint for this service is groupcall

The config roomName is required to connect to a specific room.

    <div class="max-w-screen-2xl h-auto my-auto">
          <div id="millicast-conference-1" class="has-settings"></div>
  </div>
  <script type="text/javascript">
  	var player = jwplayer("millicast-conference-1", {
    "aspectratio": "16:9",
    "playbackRateControls": true,
    "plugins": {
        "../../js/webrtcpeakmeter-8.20.0.js": {},
        "../../js/webrtcpublisher-8.20.0.js": {
            "autoStartDevice": true,
            "conferenceContainer": "#conference-container",
            "floatedControls": true,
            "iceServers": [
                {
                    "urls": [
                        "stun:stun.l.google.com:19302",
                        "stun:stun1.l.google.com:19302",
                        "stun:stun2.l.google.com:19302",
                        "stun:stun3.l.google.com:19302",
                        "stun:stun4.l.google.com:19302"
                    ]
                }
            ],
            "millicast": {
                "accountId": "huaHNT",
                "codec": "h264",
                "publishToken": "02c72abe7df3a34ac5245cdd359fedc16a8285b7627818f7c996a8a752b1783f",
                "roomServerURL": "rtc.electroteque.org:8443/groupcall",
                "subToken": "b23ebffd67a92feff751983ad91c4ddfd83285b5a3b899cffbab1d28275dce44"
            },
            "publisher": true,
            "roomName": "room1",
            "server": "millicast-conference",
            "settings": true,
            "toggleScreen": true
        }
    },
    "sources": [
        {
            "appName": "webrtc",
            "file": "C6Lx6ku6FEXgKtt",
            "live": true,
            "publisher": true,
            "type": "mp4"
        }
    ],
    "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>