{"id":13692306,"url":"https://github.com/GetStream/webrtc-android","last_synced_at":"2025-05-02T19:32:05.058Z","repository":{"id":65908537,"uuid":"601845187","full_name":"GetStream/webrtc-android","owner":"GetStream","description":"🛰️ A versatile WebRTC pre-compiled Android library that reflects the recent WebRTC updates to facilitate real-time video chat for Android and Compose.","archived":false,"fork":false,"pushed_at":"2025-02-19T06:31:30.000Z","size":91854,"stargazers_count":659,"open_issues_count":34,"forks_count":80,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-02-19T07:28:36.022Z","etag":null,"topics":["android","getstream","jetpack","jetpack-compose","kotlin","rtc","video-chat","webrtc","webrtc-android"],"latest_commit_sha":null,"homepage":"https://getstream.github.io/webrtc-android/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GetStream.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-15T00:12:10.000Z","updated_at":"2025-02-19T06:31:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"597d35c4-f79e-40ea-97e2-691bb25b388e","html_url":"https://github.com/GetStream/webrtc-android","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fwebrtc-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fwebrtc-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fwebrtc-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fwebrtc-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GetStream","download_url":"https://codeload.github.com/GetStream/webrtc-android/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252095323,"owners_count":21693899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","getstream","jetpack","jetpack-compose","kotlin","rtc","video-chat","webrtc","webrtc-android"],"created_at":"2024-08-02T17:00:56.201Z","updated_at":"2025-05-02T19:32:05.045Z","avatar_url":"https://github.com/GetStream.png","language":"Kotlin","funding_links":[],"categories":["Miscellaneous"],"sub_categories":["Tool"],"readme":"![AndroidWebRTC-1200x630px](https://user-images.githubusercontent.com/24237865/218683564-e4279cf9-51c2-4b48-9ca4-45a258a6898a.jpg)\n\n\u003ch1 align=\"center\"\u003eWebRTC Android by Stream\u003c/h1\u003e\u003c/br\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://android-arsenal.com/api?level=21\"\u003e\u003cimg alt=\"API\" src=\"https://img.shields.io/badge/API-21%2B-brightgreen.svg?style=flat\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/GetStream/stream-webrtc-android/actions/workflows/android.yml\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/GetStream/stream-webrtc-android/actions/workflows/android.yml/badge.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://getstream.io\"\u003e\u003cimg src=\"https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/HayesGordon/e7f3c4587859c17f3e593fd3ff5b13f4/raw/11d9d9385c9f34374ede25f6471dc743b977a914/badge.json\" alt=\"Stream Feeds\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n🛰️ **WebRTC Android** is Google's WebRTC pre-compiled library for Android by [Stream](https://getstream.io?utm_source=Github\u0026utm_medium=Jaewoong_OSS\u0026utm_content=Developer\u0026utm_campaign=Github_Feb2023_Jaewoong_StreamWebRTCAndroid\u0026utm_term=DevRelOss). It reflects the recent [GetStream/webrtc](https://github.com/getstream/webrtc) updates to facilitate real-time video chat using functional UI components, Kotlin extensions for Android, and Compose.\n\n## Agenda\nSince Google no longer supported the [WebRTC library for Android](https://webrtc.github.io/webrtc-org/native-code/android/) for many years (even JCenter has been shut down, so the library is not available now), we decided to build our own pre-compiled WebRTC core library that reflects recent WebRTC commits with some improvements.\n\n## Who's Using WebRTC Android?\n\n👉 [Check out who's using WebRTC Android](/usecases.md).\n\n## 📱 Use Cases\n\nYou can see the use cases of this library in the repositories below:\n\n- [stream-video-android](https://github.com/getstream/stream-video-android): 📲 An official Android Video SDK by Stream, which consists of versatile Core + Compose UI component libraries that allow you to build video calling, audio room, and, live streaming apps based on Webrtc running on Stream's global edge network.\n- [webrtc-in-jetpack-compose](https://github.com/GetStream/webrtc-in-jetpack-compose): 📱 This project demonstrates WebRTC protocol to facilitate real-time video communications with Jetpack Compose.\n\n## ✍️ Technical Content\n\nIf 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:\n\n- **[WebRTC for the Brave](https://getstream.io/resources/projects/webrtc/)**: This lesson consists of several modules aimed at helping developers better understand the concepts of WebRTC. From making your first call using peer-to-peer to deep technical breakdowns of common WebRTC architectures, we provide a step-by-step guide to understanding the nuances of the framework.\n- **[Building a Video Chat App: WebRTC on Android (Part1)](https://getstream.io/blog/webrtc-on-android/)**\n- **[Building a Video Chat App: WebRTC in Jetpack Compose (Part2)](https://getstream.io/blog/webrtc-jetpack-compose/)**\n- **[Pre-built Android WebRTC Library: Buld Your Own WebRTC Library for Android](https://getstream.io/resources/projects/webrtc/library/android/)**\n- **[HTTP, WebSocket, gRPC or WebRTC: Which Communication Protocol is Best For Your App?](https://getstream.io/blog/communication-protocols/)**\n- **[WebRTC Protocol: What is it and how does it work?](https://getstream.io/glossary/webrtc-protocol/)**\n\n\u003ca href=\"https://getstream.io/chat/sdk/compose?utm_source=Github\u0026utm_medium=Jaewoong_OSS\u0026utm_content=Developer\u0026utm_campaign=Github_Feb2023_Jaewoong_StreamWebRTCAndroid\u0026utm_term=DevRelOss\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/24237865/138428440-b92e5fb7-89f8-41aa-96b1-71a5486c5849.png\" align=\"right\" width=\"12%\"/\u003e\n\u003c/a\u003e\n\n## 🛥 Stream Chat and Voice \u0026 Video Calling SDK\n\n__[Stream Video SDK for Compose](https://getstream.io/video/docs/android?utm_source=Github\u0026utm_medium=Jaewoong_OSS\u0026utm_content=Developer\u0026utm_campaign=Github_Feb2023_Jaewoong_StreamWebRTCAndroid\u0026utm_term=DevRelOss)__ is the official Android SDK for [Stream Video](https://getstream.io/video/?utm_source=Github\u0026utm_medium=Jaewoong_OSS\u0026utm_content=Developer\u0026utm_campaign=Github_Feb2023_Jaewoong_StreamWebRTCAndroid\u0026utm_term=DevRelOss), a service for building video calls, audio rooms, and live-streaming applications. Stream's versatile Video SDK has been built with this **webrtc-android** library, and you can check out the tutorials below if you want to get more information.\n\n- [Stream Video SDK for Android on GitHub](https://github.com/getstream/stream-video-android?utm_source=Github\u0026utm_medium=Jaewoong_OSS\u0026utm_content=Developer\u0026utm_campaign=Github_Dec2023_Jaewoong_TwitchCompose\u0026utm_term=DevRelOss)\n- [Video Call Tutorial](https://getstream.io/video/docs/android/tutorials/video-calling?utm_source=Github\u0026utm_medium=Jaewoong_OSS\u0026utm_content=Developer\u0026utm_campaign=Github_Dec2023_Jaewoong_TwitchCompose\u0026utm_term=DevRelOss)\n- [Audio Room Tutorial](https://getstream.io/video/docs/android/tutorials/audio-room?utm_source=Github\u0026utm_medium=Jaewoong_OSS\u0026utm_content=Developer\u0026utm_campaign=Github_Dec2023_Jaewoong_TwitchCompose\u0026utm_term=DevRelOss)\n- [Livestream Tutorial](https://getstream.io/video/docs/android/tutorials/livestream?utm_source=Github\u0026utm_medium=Jaewoong_OSS\u0026utm_content=Developer\u0026utm_campaign=Github_Dec2023_Jaewoong_TwitchCompose\u0026utm_term=DevRelOss)\n\n\n## Download\n[![Maven Central](https://img.shields.io/maven-central/v/io.getstream/stream-webrtc-android.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.getstream%22%20AND%20a:%22stream-webrtc-android%22)\n\n### Gradle\n\nAdd the below dependency to your **module**'s `build.gradle` file:\n\n```kotlin\ndependencies {\n    implementation(\"io.getstream:stream-webrtc-android:1.3.8\")\n}\n```\n\n## SNAPSHOT\n\n\u003cdetails\u003e\n \u003csummary\u003eSee how to import the snapshot\u003c/summary\u003e\n\n### Including the SNAPSHOT\n\nSnapshots of the current development version of AvatarView are available, which track [the latest versions](https://oss.sonatype.org/content/repositories/snapshots/io/getstream/stream-webrtc-android/).\n\nTo import snapshot versions on your project, add the code snippet below on your gradle file.\n```kotlin\nrepositories {\n   maven(url=\"https://oss.sonatype.org/content/repositories/snapshots/\")\n}\n```\n\nNext, add the below dependency to your **module**'s `build.gradle` file:\n\n```kotlin\ndependencies {\n    implementation(\"io.getstream:stream-webrtc-android:1.3.8-SNAPSHOT\")\n}\n```\n\n\u003c/details\u003e\n\n## Usages\n\nOnce you import this library, you can use all of the `org.webrtc` packge functions, such as `org.webrtc.PeerConnection` and `org.webrtc.VideoTrack`. For more information, you can check out the [API references for WebRTC packages](https://getstream.github.io/webrtc-android/).\n\nHere are the most commonly used APIs in the WebRTC library, and you can reference the documentation below:\n\n- [PeerConnection](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-peer-connection/index.html?query=open%20class%20PeerConnection): Provides methods to create and set an SDP offer/answer, add ICE candidates, potentially connect to a remote peer, monitor the connection, and close the connection once it’s no longer needed.\n- [PeerConnectionFactory](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-peer-connection-factory/index.html?query=open%20class%20PeerConnectionFactory): Create a `PeerConnection` instance.\n- [EglBase](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-egl-base/index.html?query=interface%20EglBase): \nHolds EGL state and utility methods for handling an egl 1.0 EGLContext, an EGLDisplay, and an EGLSurface.\n- [VideoTrack](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-video-track/index.html?query=open%20class%20VideoTrack%20:%20MediaStreamTrack): Manages multiple `VideoSink` objects, which receive a stream of video frames in real-time and it allows you to control the `VideoSink` objects, such as adding, removing, enabling, and disabling.\n- [VideoSource](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-video-source/index.html?query=open%20class%20VideoSource%20:%20MediaSource): Used to create video tracks and add VideoProcessor, which is a lightweight abstraction for an object that can receive video frames, process them, and pass them on to another object.\n- [AudioTrack](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-audio-track/index.html): Manages multiple `AudioSink` objects, which receive a stream of video frames in real-time and it allows you to control the `AudioSink` objects, such as adding, removing, enabling, and disabling.\n- [AudioSource](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-audio-source/index.html?query=open%20class%20AudioSource%20:%20MediaSource): Used to create audio tracks.\n- [MediaStreamTrack](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-media-stream-track/index.html?query=open%20class%20MediaStreamTrack): Java wrapper for a C++ `MediaStreamTrackInterface`.\n- [IceCandidate](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-ice-candidate/index.html?query=open%20class%20IceCandidate): Representation of a single ICE Candidate, mirroring `IceCandidateInterface` in the C++ API.\n- [SessionDescription](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-session-description/index.html?query=open%20class%20SessionDescription): Description of an RFC 4566 Session. SDPs are passed as serialized Strings in Java-land and are materialized to SessionDescriptionInterface as appropriate in the JNI layer.\n- [SurfaceViewRenderer](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-surface-view-renderer/index.html?query=open%20class%20SurfaceViewRenderer%20:%20SurfaceView,%20SurfaceHolder.Callback,%20VideoSink,%20RendererCommon.RendererEvents): Display the video stream on a SurfaceView.\n- [Camera2Capturer](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-camera2-capturer/index.html?query=open%20class%20Camera2Capturer%20:%20CameraCapturer): The `Camera2Capturer` class is used to provide video frames for a `VideoTrack` (typically local) from the provided cameraId. `Camera2Capturer` must be run on devices `Build.VERSION_CODES.LOLLIPOP` or higher.\n- [Camera2Enumerator](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-camera2-enumerator/index.html?query=open%20class%20Camera2Enumerator%20:%20CameraEnumerator)\n\nIf you want to learn more about building a video chat application for Android using WebRTC, check out the blog post below:\n\n- **[Building a Video Chat App: WebRTC on Android (Part1)](https://getstream.io/blog/webrtc-on-android/)**\n\n\u003cimg align=\"right\" width=\"15%\" src=\"https://user-images.githubusercontent.com/24237865/149445065-47c2506d-a738-4fb2-b4fb-eb6841b9e202.png\" /\u003e\n\n## WebRTC for UI Components\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.getstream/stream-webrtc-android-ui.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.getstream%22%20AND%20a:%22stream-webrtc-android-ui%22)\n\n**Stream WebRTC Android** supports some useful UI components for WebRTC, such as `VideoTextureViewRenderer`. First, add the dependency below to your **module's** `build.gradle` file:\n\n```gradle\ndependencies {\n    implementation \"io.getstream:stream-webrtc-android-ui:$version\"\n}\n```\n\n### VideoTextureViewRenderer\n\n`VideoTextureViewRenderer` is a custom [TextureView](https://developer.android.com/reference/android/view/TextureView) that implements [VideoSink](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-video-sink/index.html?query=interface%20VideoSink) and [SurfaceTextureListener](https://developer.android.com/reference/kotlin/android/view/TextureView.SurfaceTextureListener.html). \n\nUsually, you can use [SurfaceViewRenderer](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-surface-view-renderer/index.html?query=open%20class%20SurfaceViewRenderer%20:%20SurfaceView,%20SurfaceHolder.Callback,%20VideoSink,%20RendererCommon.RendererEvents) to display real-time video streams on a layout if you need a simple video call screen without overlaying video frames over another one. However, it might not work well as you expect if you suppose to need to design a complex video call screen, such as one video call layout should overlay another video call layout, such as the example below:\n\n![Screenshot](https://user-images.githubusercontent.com/24237865/218671884-d027ef03-1ccc-4d12-8153-adc2964034cc.png)\n\nFor this case, we'd recommend you use `VideoTextureViewRenderer` like the example below:\n\n```xml\n\u003cio.getstream.webrtc.android.ui.VideoTextureViewRenderer\n    android:id=\"@+id/participantVideoRenderer\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n /\u003e\n```\n\nYou can add or remove [VideoTrack](https://getstream.github.io/webrtc-android/stream-webrtc-android/org.webrtc/-video-track/index.html?query=open%20class%20VideoTrack%20:%20MediaStreamTrack) like the below:\n\n```kotlin\nvideoTrack.video.addSink(participantVideoRenderer)\nvideoTrack.video.removeSink(participantVideoRenderer)\n```\n\n\u003cimg align=\"right\" width=\"15%\" src=\"https://user-images.githubusercontent.com/24237865/149444862-961adb83-da2a-4179-9c27-37edb2f982f4.png\"\u003e\n\n## WebRTC for Jetpack Compose\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.getstream/stream-webrtc-android-compose.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.getstream%22%20AND%20a:%22stream-webrtc-android-compose%22)\n\n**Stream WebRTC Android** supports some Jetpack Compose components for WebRTC, such as `VideoRenderer` and `FloatingVideoRenderer`. First, add the dependency below to your **module's** `build.gradle` file:\n\n```gradle\ndependencies {\n    implementation \"io.getstream:stream-webrtc-android-compose:$version\"\n}\n```\n\n### VideoRenderer\n\n`VideoRenderer` is a composable function that renders a single video track in Jetpack Compose. \n\n```kotlin\nVideoRenderer(\n    videoTrack = remoteVideoTrack,\n    modifier = Modifier.fillMaxSize()\n    eglBaseContext = eglBaseContext,\n    rendererEvents = rendererEvents\n)\n```\n\nYou can observe the rendering state changes by giving `RendererEvents` interface like the below:\n\n```kotlin\nval rendererEvents = object : RendererEvents {\n      override fun onFirstFrameRendered() { .. }\n      override fun onFrameResolutionChanged(videoWidth: Int, videoHeight: Int, rotation: Int) { .. }\n}\n```\n\n### FloatingVideoRenderer\n\n`FloatingVideoRenderer` represents a floating item that features a participant video, usually the local participant. You can use this composable function to overlay a single video track on another, and users can move the floating video track with user interactions.\n\nYou can use `FloatingVideoRenderer` with `VideoRenderer` like the example below:\n\n```kotlin\nvar parentSize: IntSize by remember { mutableStateOf(IntSize(0, 0)) }\n\nif (remoteVideoTrack != null) {\n  VideoRenderer(\n    videoTrack = remoteVideoTrack,\n    modifier = Modifier\n      .fillMaxSize()\n      .onSizeChanged { parentSize = it },\n    eglBaseContext = eglBaseContext,\n    rendererEvents = rendererEvents\n  )\n}\n\nif (localVideoTrack != null) {\n  FloatingVideoRenderer(\n    modifier = Modifier\n      .size(width = 150.dp, height = 210.dp)\n      .clip(RoundedCornerShape(16.dp))\n      .align(Alignment.TopEnd),\n    videoTrack = localVideoTrack,\n    parentBounds = parentSize,\n    paddingValues = PaddingValues(0.dp),\n    eglBaseContext = eglBaseContexteglBaseContext,\n    rendererEvents = rendererEvents\n  )\n}\n```\n\n\u003cimg align=\"right\" width=\"90px\" src=\"https://user-images.githubusercontent.com/24237865/178630165-76855349-ac04-4474-8bcf-8eb5f8c41095.png\"/\u003e\n\n## WebRTC KTX\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.getstream/stream-webrtc-android-ktx.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.getstream%22%20AND%20a:%22stream-webrtc-android-ktx%22)\n\n**Stream WebRTC Android** supports some useful extensions for WebRTC based on [Kotlin's Coroutines](https://kotlinlang.org/docs/coroutines-overview.html). First, add the dependency below to your **module's** `build.gradle` file:\n\n```gradle\ndependencies {\n    implementation \"io.getstream:stream-webrtc-android-ktx:$version\"\n}\n```\n\n### addRtcIceCandidate\n\n`addRtcIceCandidate` is a suspend function that allows you to add a given `IceCandidate` to a `PeerConnection`. So you can add an `IceCandidate` to a `PeerConnection` as Coroutines-style, not callback-style.\n\n```kotlin\npendingIceMutex.withLock {\n    pendingIceCandidates.forEach { iceCandidate -\u003e\n        connection.addRtcIceCandidate(iceCandidate)\n    }\n    pendingIceCandidates.clear()\n}\n```\n\n### createSessionDescription\n\nYou can create a `SessionDescription`, which delegates `SdpObserver` with Coroutines styles:\n\n```kotlin\nsuspend fun createAnswer(): Result\u003cSessionDescription\u003e {\n  return createSessionDescription { sdpObserver -\u003e connection.createAnswer(sdpObserver, mediaConstraints) }\n}\n```\n\n## Instructions for Setting Up Chromium Dev Tool\n\nThis is an instruction for setting up Chromium Dev Tool if you need to compile the WebRTC core library by yourself with this project.\n\n[Chromium Dev Tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)\n\n- You need to set up depot tools to build \u0026 fetch Chromium codebase.\n\n- You should fetch the chromium WebRTC repository from the Google's repository against HEAD commits.\n\n\u003cimg width=\"449\" alt=\"Screenshot 2023-02-08 at 11 47 14 AM\" src=\"https://user-images.githubusercontent.com/24237865/218024381-7005bf74-cac9-4501-bbe8-e4258d3fa384.png\"\u003e\n\n\u003e **Note**: Chromium WebRTC core libraries can be bulit only in Linux OS. Every step takes its own time based on the machine specs and internet speed, so make sure every step is completed without interruption.\n\nYou need to set up AWS instance (pre-requiests):\n\n- Ubuntu 14.04 LTS (trusty with EoL April 2022)\n- 8 GB memory ram\n- At least 50 GB HDD/SSD storage\n\nTo compile the pre-built WebRTC library for Android, you must follow the steps below:\n\n```\n1. git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git\n    \n2. export PATH=\"$PATH:${HOME}/depot_tools\"\n    \n3. mkdir webrtc_android \u0026\u0026 cd webrtc_android\n    \n4. fetch --nohooks webrtc_android\n        \n5. gclient sync\n    \n6. cd src \u0026\u0026 ./build/install-build-deps.sh\n    \n7. git branch -r\n    \n8. git checkout origin/master\n    \n# To check you're in origin/master branch and check out to a specific branch if you want.\n9. git branch\n\n10. Replace Android sources \u0026 NDK/C/C++ files with this repository.\n\n11. tools_webrtc/android/build_aar.py\n```\n\nTo install all required dependencies for linux, a script is provided for Ubuntu, which is unfortunately only available after your first gclient sync and make sure your current directory is `webrtc_android/src/`:\n\n```\ncd src \u0026\u0026 ./build/install-build-deps.sh\n```\n\nYou can see the available latest branches looks like the image below:\n\n\u003cimg width=\"270\" alt=\"Screenshot 2023-02-14 at 5 26 32 PM\" src=\"https://user-images.githubusercontent.com/24237865/218680102-d7522dd5-1cf1-4c3b-ba61-463b75f5f714.png\"\u003e\n\n\nNow you can checkout to the latest branch which is `branch-heads/m79` or something, using this command:\n\n```\ngit checkout branch-heads/m79\n```\n\nHowever, this project reflects the latest updates for WebRTC, so you must check out to the master branch like this:\n\n```\n8. git checkout origin/master\n```\n\nThis will help you to resolve most of compilation issues. To get the details about your current branch you can simply use these commands:\n\n```\n9. git branch\n```\n\n### Using Manual Compilation:\n\nThis process will manually compile the source code for each particular CPU type. Manual Compiling involves these two steps:\n\n1. Generate projects using GN.\n2. Compile using Ninja.\n\nThis step will compile the library for Debug and Release modes of Development.\n\nEnsure your current working directory is webrtc_android/src/ of your workspace. Then run:\n\n```\n11. gn gen out/Debug --args='target_os=\"android\" target_cpu=\"arm\"'\n11. gn gen out/Release --args='is_debug=false is_component_build=false rtc_include_tests=false target_os=\"android\" target_cpu=\"arm\"'\n```\n\nYou can specify a directory of your own choice instead of out/Debug, to enable managing multiple configurations in parallel.\n\n- To build for ARM64: use target_cpu=\"arm64\"\n- To build for 32-bit x86: use target_cpu=\"x86\"\n- To build for 64-bit x64: use target_cpu=\"x64\"\n\nFor compilation you can simply use these following commands for (out/Debug, out/Release):\n```\n11. ninja -C out/Debug\n11. ninja -C out/Release\n```\n\n### Using AAR Build Tools:\n\nThis is the most simple process, which compiles the source code for all supported CPU types such as:\n\n- arm64-v8a\n- armeabi-v7a\n- x86\n- x86_64\n\nAfter compiling the package, it includes all these native libraries and `.jar` library into `*.aar` file.\n\nMake sure your current working directory is `webrtc_android/src/` of your workspace. Then run:\n\n```\n11. tools_webrtc/android/build_aar.py\n```\n\nThis process will take some time based on your machine specs and internet speed, so here we go:\n\n![image](https://user-images.githubusercontent.com/24237865/218025156-22fd6460-803a-4490-bbd5-48a1c4f1f452.png)\n\nNow, if you look in the `webrtc_android/src/` directory, It turns out that you will end up with the compilation and building of `libwebrtc.aar`.\n\n \u003ca href=\"https://getstream.io/chat/sdk/compose?utm_source=Github\u0026utm_medium=Jaewoong_OSS\u0026utm_content=Developer\u0026utm_campaign=Github_Feb2023_Jaewoong_StreamWebRTCAndroid\u0026utm_term=DevRelOss\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/24237865/146505581-a79e8f7d-6eda-4611-b41a-d60f0189e7d4.jpeg\" align=\"right\" /\u003e\u003c/a\u003e\n\n## Find this Android library useful? 💙\n\nSupport it by joining __[stargazers](https://github.com/getStream/stream-webrtc-android/stargazers)__ for this repository. ⭐️ \u003cbr\u003e\nAlso, follow __[maintainers](https://github.com/skydoves)__ on GitHub for our next creations! 🤩\n\n# License\n\n- Mirrors [GetStream/WebRTC](https://github.com/getstream/webrtc) patches.\n- [WebRTC](https://webrtc.org) software is licensed under the [BSD license](https://github.com/GetStream/webrtc/blob/main/LICENSE).\n- Includes patches from [sora-android-sdk](https://github.com/shiguredo/sora-android-sdk), licensed under the [Apache 2.0](https://github.com/shiguredo/sora-android-sdk?tab=Apache-2.0-1-ov-file#readme).\n- Includes modifications from [webrtc-sdk/webrtc](https://github.com/webrtc-sdk/webrtc), licensed under the [BSD license](https://github.com/webrtc-sdk/webrtc/blob/master/LICENSE).\n\n```xml\nCopyright 2023 Stream.IO, Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGetStream%2Fwebrtc-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGetStream%2Fwebrtc-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGetStream%2Fwebrtc-android/lists"}