GithubHelp home page GithubHelp logo

aws-samples / amazon-ivs-chime-messaging-ugc-demo Goto Github PK

View Code? Open in Web Editor NEW
22.0 7.0 6.0 85 KB

This demo is designed to educate people who want to build live streaming platform with chatting feature. This demo is implemented using Amplify with Amazon IVS, ChimeSDK Messaging.

License: Apache License 2.0

HTML 1.39% CSS 4.44% JavaScript 93.19% Shell 0.97%
amazon-ivs ivs ivs-channel ivs-stream chime chimesdk amplify amplify-js amplify-cli react

amazon-ivs-chime-messaging-ugc-demo's Introduction

Build a simple UGC(User Generated Content) platform using Amazon IVS and Chime SDK

Overview

This demo provides live streaming services for streamers and you can join the streamer's channel and watch it. You can chat with streamer and other viewers. Moreover, you could send a heart to streamer when you want to show your love to the streamer.

ivsdemo-preview

IMPORTANT NOTE: This project is intended for education purposes only and not for production usage.

Demo Architecture

image

Serverless Web Application

This demo is serverless web application, leveraging AWS Amplify. AWS Amplify provides set of tools and services that can be used together or on their own, to help front-end web developer build scalable full stack applications. You can configure app backends like backend API with Amazon API Gateway, AWS Lambda and auth feature with Amazon Cognito, DB with AWS AppSync.

Streaming & Chat Messaging

The streaming feature leverages Amazon Interactive Video Service. Amazon IVS provides streaming channel and Timed MetaAPI for interactive services like poll, Q&A, Heart button. To interact between streamer and viewers with chatting, this demo provides messaging chat feature with Amazon Chime SDK messaging.

Quick Start

IMPORTANT NOTE: Deploying this demo application in your AWS account will create and consume AWS resources, which will cost money.

To start demo quickly, follow the instructions as below.

Provision Backend Side

  • Click Launch Stack

  • Input Parameters

Check Available Region of using Amazon IVS and ChimeSDK Messaging. Default is us-east-1

image

  • Click Next and Create stack with acknowledgement check

image

  • Get outputs from CloudFormation stack

image

Configure Provisioned Backends to Frontend

  • clone repo to your local
  • go to root dir of repo

NOTE: If you are using Cloud9 for demo, you have to increase volume size of Cloud9 Instance. Run script resize_volume.shbefore npm install.

  • If you are using Cloud9

    • Go to Root Dir
    • chmod +x resize_volume.sh
    • ./resize_volume.sh
    • This script only works in Amazon Linux Cloud9. If you are using Ubuntu Cloud9, change script yum to apt-get -y.
  • Copy & paste API endpoints to src/config/apiConfig.js from Cloudformation ApiEndpoint outputs

image

  • Copy & past ChimeAppInstance ARN to src/config/chimeConfig.js from Cloudformation appInstanceArn output

image

Install & Set up Amplify

  • Run command npm install -g @aws-amplify/cli
  • Run command amplify configure
  • Set up Region and IAM User which you want to set.

image

Set Up Amplify Backend

  • Run command amplify init in root dir of repo

Enter the input value by referring to the following.

image

  • Run command amplify import auth
  • Select Cognito which is created in CloudFormation

image

NOTE: AppSync in Amplify cli slightly changed. Please follow as below to add AppSync API.

  • Run command amplify add api

  • Select GraphQL

  • Select Authorization modes. image

  • Select Amazon Cognito User Pool and type 'N' which we will not configure additional auth types. image

  • Select Continue and Blank Schema.

  • Select Y to edit schema.

  • Result as below. Open graphql schema file. file path is as below. image

  • Copy schema from src/config/schema.graphql to schema file like as below.

  • Save it. image

  • Run command amplify push

  • Type Yes to continue

  • Type Yes to create GraphQL API

  • Select javascript

  • Press ENTER Enter to select file name pattern of graphql queries to default

  • Type Yes to generate/update all possible GraphQL operations

  • Press ENTER to maximum statement depth as default

image

  • After updating resources is done, Check with amplify status command

image

Finally Done! Use Demo!

  • Go to root dir of repo
  • (For one time) Run command npm install
  • Run command npm start

Create Channel

  • Click Create Channel Button and create channel!

image

  • If you click My Channels, You can see your channels.

Join Others Channel

You could join the other channel and enjoy it.

Streaming your contents

You can stream your contents using OBS.

  • Click CHANNEL INFO in My Channels.

image

  • Get INGEST ENDPOINT and Channel STREAM KEY.
  • Input to OBS Application and stream it!
  • Start OBS > Settings > Stream and input ingest endpoint and stream key.

image

  • Start Streaming and enjoy Demo!

Clean Up

  • Remove CloudFormation Stack
  • Remove Amazon IVS channel which you made
  • Run Command amplify delete

Resources

License

This sample code is made available under a APACHE2.0 license. See the LICENSE file.

amazon-ivs-chime-messaging-ugc-demo's People

Contributors

amazon-auto avatar jonathan-sjkim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

amazon-ivs-chime-messaging-ugc-demo's Issues

Consider using Amplify Video for IVS deployment

This project currently deploy IVS as part of your application and manually configure OBS. Amplify Video, a plugin to AWS Amplify will allow users to deploy and manage IVS resources just like the other amplify resources deployed for API and Auth. It also has a helper function to configure OBS with the stream keys of the deployed IVS resources.

https://github.com/awslabs/amplify-video

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.