https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android

Android SDK for interfacing with Amazon Kinesis Video Streams Signaling Service.

https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.1%) to scientific vocabulary

Keywords

andriod android-device android-sdk aws peer-streaming streaming-video video-streaming webrtc webrtc-sdk
Last synced: 6 months ago · JSON representation

Repository

Android SDK for interfacing with Amazon Kinesis Video Streams Signaling Service.

Basic Info
  • Host: GitHub
  • Owner: awslabs
  • License: apache-2.0
  • Language: Java
  • Default Branch: master
  • Homepage:
  • Size: 3.84 MB
Statistics
  • Stars: 61
  • Watchers: 17
  • Forks: 41
  • Open Issues: 3
  • Releases: 2
Topics
andriod android-device android-sdk aws peer-streaming streaming-video video-streaming webrtc webrtc-sdk
Created over 6 years ago · Last pushed 10 months ago
Metadata Files
Readme Contributing License Code of conduct

README.md

Amazon Kinesis Video Streams Android WebRTC SDK

Build Status

Running KinesisVideoWebRTCDempApp Sample

1. Download the WebRTC SDK for Android

To download the Kinesis Video Streams WebRTC SDK in Android, run the following command:

git clone https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android.git

2. Create a user pool

Follow the instructions here to set up an Amazon Cognito user pool for secure login.

3. Create an identity pool

Follow the instructions here to set up an Amazon Cognito identity pool.

4. Build and run the demo application using Android Studio

  1. Import the downloaded SDK into the Android Studio integrated development environment by opening the amazon-kinesis-video-streams-webrtc-sdkandroid/build.gradle with Open an existing Android Studio project.
  2. You will need all the information from the above steps copied in clipboard, then paste them into this file on your local file awsconfiguration.json. Your completed awsconfiguration.json should look something like this: json { "Version": "1.0", "CredentialsProvider": { "CognitoIdentity": { "Default": { "PoolId": "us-west-2:01234567-89ab-cdef-0123-456789abcdef", "Region": "us-west-2" } } }, "IdentityManager": { "Default": {} }, "CognitoUserPool": { "Default": { "AppClientSecret": "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmno", "AppClientId": "0123456789abcdefghijklmnop", "PoolId": "us-west-2_qRsTuVwXy", "Region": "us-west-2" } } }
  3. Import Google WebRTC (aka libwebrtc). Choose one of the following:

    a. Build libwebrtc yourself, following https://webrtc.github.io/webrtc-org/native-code/android/#getting-the-code. After it's been built, place the .aar file in libs.

    b. Acquire a pre-built binary of libwebrtc and import it.

  4. Click gradle Sync and Build

  5. Run the demo application in simulator or in Android device (connected through USB).

5. Peer to Peer Streaming

On your Android device, open AWSKinesisVideoWebRTCDemoApp and sign up with Create New Account or sign in with existing accounts.

Note: This account information is stored in your Cognito User Pool and is not your AWS Console user name/password.

Once login is successful, you will entering the following channel information to start peer to peer streaming.

  1. Enter a channel name: e.g. demo-channel
  2. Enter AWS region: e.g. us-west-2
  3. Select audio if you would like to send both audio or video data.
  4. Optionally, when using it in viewer mode, you can enter a unique Client Id . Client ID is required only if multiple viewers are connected to a channel. This helps channel's master identify respective viewers.

To verify peer to peer streaming, do any of the following setup. In these setup, ensure that the signaling channel name, region, viewer ID, and the AWS account ID are the same.

### 5.1 Peer to Peer Streaming between two Android device: Master and Viewer

  • Start one Android device in master mode for starting a new session. Remote peer will be joining as viewer to this master. There should be only one master for any given channel.
  • Use another Android device to connect to the same channel name (started up in the step above as master) in viewer mode; this will connect to an existing session (channel) where a master is connected.
    • Verify media showing up in both Android devices.

### 5.2 Peer to Peer Streaming between Embedded SDK as master and Android device as viewer

  • Run Kinesis Video Streams WebRTC embedded SDK in master mode on a camera device.
  • Start the Android device in viewer mode - you should be able to check the video (and audio if selected both in embedded SDK) showing up in the Android device from the camera.
  • Verify media showing up from the Embedded SDK to the Android.

### 5.3 Peer to Peer Streaming between Android device as master and Web browser as viewer

  • Start one Android device in master mode for starting a new session.
  • Start the web browser using the Javascript SDK and start it as viewer.
  • Verify media showing up from the Android device to the browser.

6. ICE Candidate Trickling

Candidate trickling is a technique through which a caller may incrementally provide candidates to the callee after the initial offer has been dispatched; the semantics of "Trickle ICE" are defined in [RFC8838].

Trickle ICE is the default behavior within the Kinesis Video Stream WebRTC SDK for Android since it reduces the time it takes for the ICE negotiation process. However, in the case that it needs to be disabled, locate the RTCConfiguration property called ContinualGatheringPolicy and change it to GATHERONCE instead of GATHERCONTINUALLY (default).

java PeerConnection.RTCConfiguration rtcConfig = new PeerConnection.RTCConfiguration(); rtcConfig.continualGatheringPolicy = PeerConnection.ContinualGatheringPolicy.GATHER_CONTINUALLY;

7. Testing

This SDK has been tested with Java 11, 17 to build the Gradle dependencies and Java 8, 11, and, 17 in the compile options in build.gradle

agsl compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } For more details about the different Java versions, please check Java versions in Android builds

License

This library is licensed under the Apache 2.0 License.

Owner

  • Name: Amazon Web Services - Labs
  • Login: awslabs
  • Kind: organization
  • Location: Seattle, WA

AWS Labs

GitHub Events

Total
  • Watch event: 3
  • Push event: 6
  • Pull request review event: 11
  • Pull request review comment event: 11
  • Pull request event: 2
  • Fork event: 5
  • Create event: 4
Last Year
  • Watch event: 3
  • Push event: 6
  • Pull request review event: 11
  • Pull request review comment event: 11
  • Pull request event: 2
  • Fork event: 5
  • Create event: 4

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 78
  • Total pull requests: 24
  • Average time to close issues: 3 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 58
  • Total pull request authors: 10
  • Average comments per issue: 2.73
  • Average comments per pull request: 0.38
  • Merged pull requests: 20
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • JeetSA (6)
  • ghost (3)
  • KunNiu (3)
  • prechtelm (3)
  • Khoronus (3)
  • yuma-m (2)
  • matiasechaharria (2)
  • landrady (2)
  • mjkimloan (2)
  • jarvislin (2)
  • ihdream72 (2)
  • ronbarrera (2)
  • 56-smw93 (1)
  • bravepiper (1)
  • samanaz (1)
Pull Request Authors
  • sirknightj (10)
  • zhiyua-git (5)
  • disa6302 (4)
  • hassanctech (3)
  • niyatim23 (2)
  • andreasichel (2)
  • stefankiesz (2)
  • Varunaditya1 (1)
  • jabouzi (1)
  • yuma-m (1)
  • takoikatakotako (1)
  • SureshkumarKV (1)
Top Labels
Issue Labels
question (15) enhancement (6) Awaiting for answers (6) Assume answered (4) bug (2) Custom Solution (2)
Pull Request Labels
dependencies (3) enhancement (2) build (1)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
proxy.golang.org: github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago

Dependencies

build.gradle maven
  • androidx.appcompat:appcompat 1.1.0 implementation
  • androidx.constraintlayout:constraintlayout 1.1.3 implementation
  • androidx.multidex:multidex 2.0.1 implementation
  • com.github.tony19:logback-android 2.0.0 implementation
  • com.google.android.material:material 1.0.0 implementation
  • com.google.code.gson:gson 2.8.6 implementation
  • com.google.guava:guava 28.1-android implementation
  • commons-codec:commons-codec 1.9 implementation
  • org.apache.commons:commons-lang3 3.9 implementation
  • org.awaitility:awaitility 3.0.0 implementation
  • org.json:json 20190722 implementation
  • org.osgi:org.osgi.framework 1.9.0 implementation
  • org.slf4j:slf4j-api 1.7.29 implementation
  • org.webrtc:google-webrtc 1.0.28513 implementation
  • junit:junit 4.12 testImplementation
app/build.gradle maven
  • androidx.appcompat:appcompat 1.6.1 implementation
  • androidx.constraintlayout:constraintlayout 2.1.4 implementation
  • com.google.android.material:material 1.9.0 implementation
  • com.google.code.gson:gson 2.8.9 implementation
  • com.google.guava:guava 28.1-android implementation
  • org.apache.commons:commons-lang3 3.9 implementation
  • org.awaitility:awaitility 4.2.0 implementation
  • org.glassfish.tyrus.bundles:tyrus-standalone-client 1.20 implementation
  • org.json:json 20190722 implementation
  • junit:junit 4.13.2 testImplementation