Among Us Automute and Sharing Gameplay with Amazon Chime SDK for JavaScript

Introduction

I used Amazon Chime SDK for JavaScript to create Among Us’ Automute function + screen delivery function. I’ve written a similar article before, and I’d like to explain some improvements about that.

Among Us and our functionality

(This section is a summary of a previous blog.)

Improvement

As a result of publishing and operating the software in the previous blog, the following issues were raised.

  • Difficult to install and operate
  • Large amount of data transmission

Ease of implementation and operation

We built all the APIs and DBs to control Amazon Chime on AWS with CDK (AWS Cloud Development Kit). However, for those who have little experience with AWS, it was difficult to understand what CDK is. Also, since we were using a number of services such as API Gateway, Lambda, DynamoDB, Cognito, etc., even though the settings were hidden by CDK, it was quite complicated to control access policies such as IAM. In addition, we had to pay for services other than Amazon Chime.

Reduce network traffic

Among us allows up to 15 people to participate in the game, and the Amazon Chime SDK allows up to 27 video sessions (25 video sessions + 2 screen sharing sessions), so there is plenty of room for all users to share their screens. However, the amount of data transfer will naturally increase with the number of sessions. On the other hand, it is unlikely that audience will see all 15 screens at once. They may only see the screens of one or two users who he are paying attention to.

Implementation of improvement

I would like to explain the implementation points of the improvement according to the above improvement policy. For more details, please refer to the source code available in the repository described below.

Deploy API and DB to heroku

I think there are two key points to redeploying APIs and DBs that were originally running on AWS to heroku.

heroku config:set AWS_ACCESS_KEY_ID=<ACCESS KEY>
heroku config:set AWS_SECRET_ACCESS_KEY=<SECRET ACCESS KEY>

Select the video image to display.

The Amazon Chime SDK allows you to create up to 27 video sessions. At the same time, the Amazon Chime SDK provides the ability for each client to partially reject the reception of these video data. In this article, we will allow the user to change whether or not to receive the video by clicking on each user in Among us. To change whether or not to receive video data, specify the target video tile ID, and do the following.

await meetingSession.audioVideo.pauseVideoTile(videiTileId);
await meetingSession.audioVideo.unpauseVideoTile(videiTileId);

Summary

This is a description of the improvements to Amongus automute made possible by the Amazon Chime SDK. This makes it much easier to deploy and more friendly to the network environment than before.

I am very thirsty!!

Disclaimer

Recording or capturing Amazon Chime SDK meetings with the demo in this blog may be subject to laws or regulations regarding the recording of electronic communications. It is your and your end users’ responsibility to comply with all applicable laws regarding the recordings, including properly notifying all participants in a recorded session, or communication that the session or communication is being recorded, and obtain their consent.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
dannadori

dannadori

Software researcher and engineer