Skip to content
프로젝트

소개

WebRTC Kotlin Multiplatform SDK

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

WebRTC KMP Maven Central

WebRTC Kotlin Multiplatform SDK is a comprehensive toolkit for integrating WebRTC functionality into your multiplatform projects. It supports Android, iOS, JS. Other platforms - PRs are welcome.

API implementation map

API Android iOS JS/WasmJS
Audio/Video :white_check_mark: :white_check_mark: :white_check_mark:
Data channel :white_check_mark: :white_check_mark: :white_check_mark:
Screen Capture :white_check_mark: :white_check_mark:

WebRTC revision

Current revision: M125

Installation

The library is published to Maven Central.

Add dependency to your common source set:

commonMain.dependencies {
  dependencies {
    implementation("com.shepeliev:webrtc-kmp:$webRtcKmpVersion")
  }
}

Running on iOS

On iOS, the WebRTC SDK is not linked as a transitive dependency, so you need to add it to your iOS project manually. This can be done using CocoaPods or SPM, depending on your project setup. Here is an example of how to link the WebRTC SDK using CocoaPods in build.gradle.kts:

kotlin {
  cocoapods {
    version = "1.0.0"
    summary = "Shared module"
    homepage = "not published"
    ios.deploymentTarget = "13.0"
   
    pod("WebRTC-SDK") { 
      version = "125.6422.05"
      moduleName = "WebRTC"
    }
  
    podfile = project.file("../iosApp/Podfile")
  
    framework {
      baseName = "shared"
      isStatic = true  
    }
  
    xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
    xcodeConfigurationToNativeBuildType["CUSTOM_RELEASE"] = NativeBuildType.RELEASE
  }

    iosX64()
    iosArm64()
    iosSimulatorArm64()
}

Also add the following to your Podfile in the target section:

use_frameworks!
pod 'shared', :path => '../shared'

Usage

Please refer to sample.

Screen Share in Android

// Set MediaProjection permission intent using `MediaProjectionIntentHolder`
val mediaProjectionPermissionLauncher = rememberLauncherForActivityResult(
    contract = ActivityResultContracts.StartActivityForResult()
) { activityResult ->
    activityResult.data?.also {
        MediaProjectionIntentHolder.intent = it
    }
}

관련 프로젝트 살펴보기

불러오는 중…