Skip to content

Latest commit

 

History

History
91 lines (65 loc) · 3.21 KB

File metadata and controls

91 lines (65 loc) · 3.21 KB

Simplifying live streaming contribution - run locally.

This sample demo app, captures the video and use a proxy in node.js to transwrap the stream to Amazon IVS

Deployment Steps:

For building the integration with AWS components and host our web application, we will be using AWS Amplify. For more complete steps on installing and configuring AWS Amplify, please visit the Amplify Documentation for React.

Pre-requirements

npm install -g @aws-amplify/cli
amplify configure

For a more complete guide on how to get started with amplify CLI, please follow the instructions of the official AWS Amplify Documentation.

Frontend and APIs: WebRTC video capture:

version 2 preview

git clone --branch v2preview  https://github.com/aws-samples/aws-simple-streaming-webapp.git
cd aws-simple-streaming-webpp/frontend/
npm install
amplify init

As name for the environment, please select dev

### Configuration details
 ? Enter a name for the environment dev
 ? Choose your default editor: Visual Studio Code
 Using default provider  awscloudformation
 ? Select the authentication method you want to use: AWS profile

With amplify init, the project and resources will be initialized in the AWS Cloud environment. Now you can push, with amplify push to create the resources.

Note: This Command will deploy the following resources in your account:

  • API Gateway: Save and retrieve IVS Parameters and ECS Container availability information
  • DynamoDB: Store IVS and Container servers parameters
  • Lambda Functions: For checking stored parameters and check Event Bridge information To list the resources that will be created you can use the command amplify status
amplify push

Run the solution in your local environment

npm start

Create your user and password

It should load the authentication page. Now you can create your first account and sign in. Application Auth

Add the ingestEndpoint, streamKey value and playbackUrl to the interface

[OPTIONAL] If you don't have a Amazon IVS created, you can follow this steps. 4.2. In your local environment http://127.0.0.1:3000 (http://127.0.0.1:3000/) the following application will be loaded.

Application Save

Start the server in a local environment: localhost

cd backend/
npm install
npm run startDev

Note: if you are running locally in HTTPS, the socket needs to be HTTPS as well, please follow this instruction instead.

Test your streaming directly from your browser

Application

[Optional]: Cleanup, removing the provisioned AWS resources.

cd ../frontend
amplify delete

Choose your next adventure: