Giter VIP home page Giter VIP logo

amazon-kinesis-video-streams-media-screencast-android's Introduction

Screencast your mobile app using Kinesis Video Stream with WebRTC in Android

Note

It was implemented by adding only the screencast function while maintaining the function provided in the sample app - KinesisVideoWebRTCDempApp

Pre-requisites

AWS account admin console access

Install the latest Amplify CLI version

  • Open terminal and run npm install -g @aws-amplify/cli to update to the latest Amplify CLI.

Amplify CLI is already configured

  • If you haven’t configured the Amplify CLI yet, follow this guide on our documentation page.

Instructions

Step1. Source Download from GitHub.

Step2. Amazon Cognito Service for user authentication

1. Create and integrate Cognito using amplify cli.

cd amazon-kinesis-video-streams-webrtc-sdk-android
amplify init

See below for ‘amplify init’ input values.

? Enter a name for the environment dev

The downloaded source has been set up in advance so that the cognito service can be created by amplify push command

amplify push

See below for ‘amplify push’ input values.

? Are you sure you want to continue? Yes

The downloaded source has been set up in advance so that the cognito service can be created by amplify push command. After about 10 minutes, Amazon Cognito Service is created in your AWS account, and json file(res/raw/amplifyconfiguration.json) is created as metadata in your Android project.

2. Add policy to IAM Role

Through Amazon Cognito service, we can authorize logged-in users to use the aws service. This app uses the kinesis video stream service for screen casting. It is necessary to add the AmazonKinesisVideoStreamFullAccess policy to the IAM role specified in the Authenticated role so that authenticated users can use the kinesis video stream service. Congito > Federated Identities > Edit identity pool > Authenticated role

IAM > Roles > select your authenticated role. ex) 'amplify-webrtcandroid-dev-220724-authRole’ > Attach policies, add “AmazonKinesisAnalyticsFullAccess”

Step3. Build and run the demo application using Android Studio

Load the downloaded source into Android Studio through File> New> Import Project. Run the demo application in simulator or in Android device. Press ‘start screencast’ button.

Connect to the Kinesis console. Select the created channel (Kinesis Video Streams> Signaling channels> demo-channel), you can see that the screen of the smartphone is cast after a while.

Cleanup

With the ‘amplify delete’ command, deletes all of the resources tied to the project from the cloud

`
amplify delete
`

See below for ‘amplify delete’ input values.

`
 ? Are you sure you want to continue? This CANNOT be undone. (This would delete all the env
ironments of the project from the cloud and wipe out all the local files created by Amplif
y CLI) Yes
`

amazon-kinesis-video-streams-media-screencast-android's People

Contributors

amazon-auto avatar xmrrh avatar

Watchers

 avatar

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.