AWS Kinesis WebRTC Subscriber

WebRTC Publisher configured for Amazon Kinesis.

{
  "live": true,
  "sources": [
    { "type": "application/webrtc", "src": "One2ManyWebRTC"}
  ]
}

Note: A live demo using AWS Kinesis. For another live working example try the Millicast Publisher and Subscriber example.

WebRTC Publisher configuration for Amazon Kinesis. Amazon Kinesis WebRTC is not a free tier and has charges.

Only one to many is possible for now until a custom WebSocket solution for group call peering is available.

Each individual stream is determined by a Signalling Channel that can be created in the console or API.

Requires including the AWS and Kinesis Javascript client SDK.

There is two methods to configure for AWS kinesis WebRTC streaming. Temporary AWS access and secret credentials can be supplied to the player with url signing done client side. Or with the use of AWS Lambda and API Gateway, Ice servers and the signed WebSocket server url can be obtained server side. With the use of Authorizers, generated Bearer tokens can be supplied for authorization to the api gateway. Create your own AWS Gateway api and Lambda functions. Example lambda functions for returning WebSocket servers and authorizers is supplied.

"kinesisvideo": {
            "subscribeUrl": "https://api.electroteque.org/subscribe",
            "subscribeToken": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0.acMKeL-pp0aAxlYeV3C3YzqxgCq2uPnBlEae7SCsV3ic4nBQt207lfL1-XinVvVHXUVkG2r3-S2TFtsbNNchhNscFH_FiVxh.qZ9fmfleXUtXfvHChFwPNg.Zx_9MSy4osZsT0VUYZF3C9Mknc8o3vigrcVZUboO9TBWZu8DpUdxBmR3ddA4Dk--Zjl6_5un9nBXD7z2ZKMbjsaqT2w4udI9WNjOstpSFjhbtC6e7laOfBv2ZIeKGfkk8ogZ3ZnYyXlyU6zM1nAvKfD3DezTCPzVQbHMa5N6bOlYJce4lCl_2wwWtgi-NFfBv8z-ZrcOzxlx9HrqUqUyAA.fybw2HIJANCYuaKli1I2xbt3606WdyGqeYADVLvh2LE"
}
"kinesisvideo": {
            "region": "",
            "credentials": {
                "accessKeyId": "",
                "secretAccessKey": ""
            }
}
    <div class="flex w-full h-auto my-auto">
          <div id="aws-subscriber" class=""></div>
  </div>
  <script type="text/javascript">
  	var player = jwplayer("aws-subscriber").setup({
    "aspectratio": "16:9",
    "playbackRateControls": true,
    "plugins": {
        "../../js/webrtcsubscriber.js": {}
    },
    "sources": [
        {
            "appName": "webrtc",
            "file": "One2ManyWebRTC",
            "live": true,
            "publisher": false,
            "type": "mp4"
        },
        {
            "src": "http://rtc.electroteque.org:1935/webrtc/myStream_360p/playlist.m3u8",
            "type": "application/x-mpegurl"
        }
    ],
    "subscriber": {
        "applicationName": "webrtc",
        "debug": true,
        "kinesisvideo": {
            "subscribeToken": "eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0.acMKeL-pp0aAxlYeV3C3YzqxgCq2uPnBlEae7SCsV3ic4nBQt207lfL1-XinVvVHXUVkG2r3-S2TFtsbNNchhNscFH_FiVxh.qZ9fmfleXUtXfvHChFwPNg.Zx_9MSy4osZsT0VUYZF3C9Mknc8o3vigrcVZUboO9TBWZu8DpUdxBmR3ddA4Dk--Zjl6_5un9nBXD7z2ZKMbjsaqT2w4udI9WNjOstpSFjhbtC6e7laOfBv2ZIeKGfkk8ogZ3ZnYyXlyU6zM1nAvKfD3DezTCPzVQbHMa5N6bOlYJce4lCl_2wwWtgi-NFfBv8z-ZrcOzxlx9HrqUqUyAA.fybw2HIJANCYuaKli1I2xbt3606WdyGqeYADVLvh2LE",
            "subscribeUrl": "https://api.electroteque.org/subscribe"
        },
        "server": "kinesisvideo",
        "serverURL": "rtc.electroteque.org",
        "userData": {
            "param1": "value1"
        }
    },
    "width": "100%"
});
  </script>