Skip to content

📱 This project demonstrates WebRTC protocol to facilitate real-time video communications with Jetpack Compose.

License

Notifications You must be signed in to change notification settings

Marchuck/webrtc-in-jetpack-compose

 
 

Repository files navigation

WebRTC in Jetpack Compose-1200x630

WebRTC in Jetpack Compose


License API Build Status Android Weekly Stream Feeds

This project demonstrates WebRTC protocol to facilitate real-time video communications with Jetpack Compose.

The purpose of this repository is to demonstrate below:

  • Implementing entire UI elements for real-time video communication with Jetpack Compose.
  • Performing real-time communication in background with Kotlin Coroutines.
  • Understanding the peer connection based on WebRTC.
  • Communicating with a signaling server to exchange peer connection information between clients.

✍️ Technical Content

If you want to have a better grasp of how WebRTC works, such as basic concepts of WebRTC, relevant terminologies, and how to establish a peer-to-peer connection and communicate with the signaling server in Android, check out the articles below:

If you'd like to get notified as we release future posts, join the watchers on GitHub or follow Stream on Twitter. You can also follow the author of this repository on GitHub.

🛥 Stream Chat and Voice & Video calling SDK

If you’re interested in adding powerful In-App Messaging to your app, check out the Compose Chat SDK for Messaging! We're also planning to release voice & video calling SDK very soon! Check out the Video & Voice Calling API on Stream's Global Edge Network, if you want early access to our SDK.

📲 Download APK

Go to the Releases to download the latest APK.

📷 Previews

drawing drawing

🛠 Tech Stacks & Open Source Libraries

  • Minimum SDK level 23.
  • 100% Jetpack Compose based + Coroutines + Flow for asynchronous.
  • WebRTC: To build real-time communication capabilities to your application that works on top of an open standard.
  • Stream WebRTC Android: A WebRTC pre-compiled library for Android reflects the recent WebRTC updates and supports functional UI components and extensions for Android and Jetpack Compose.
  • Retrofit2 & OkHttp3: Construct the REST APIs and paging network data.
  • StreamLog: A lightweight and extensible logger library for Kotlin and Android.
  • Ktor: Building a signaling client websocket server.

💻 How to build the project?

To build this project properly, you should follow the instructions below:

  1. Run the WebRTC backend server.
  2. Add the local ip address of your pc on the local.properties file on the project (Android Studio) like the below:
# You should change 192.168.1.123 to your local ip address, which is running the WebRTC backend server.
SIGNALING_SERVER_IP_ADDRESS=ws://192.168.1.123:8080/rtc

You will get your local IP address by typing the command below on your terminal:

ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}' 
  1. Lastly, run the WebRTC android project on your multiple devices to test peer communication.

🤝 Contribution

Most features are not completed except the chat feature, so that anyone can contribute and improve this project following the Contributing Guideline.

Find this repository useful? 💙

Support it by joining stargazers for this repository. ⭐
Also, follow maintainers on GitHub for our next creations! 🤩

License

Copyright 2023 Stream.IO, Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

📱 This project demonstrates WebRTC protocol to facilitate real-time video communications with Jetpack Compose.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%