• Stars
    star
    112
  • Rank 312,240 (Top 7 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created almost 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WebRTC Kotlin Multiplatform SDK

WebRTC KMP Maven Central

WebRTC Kotlin Multiplatform SDK

API implementation map

API Android iOS JS
Audio/Video ✅ ✅ ✅
Data channel ✅ ✅ ✅
Screen Capture ✅

WebRTC revision

Current revision: M114

Installation

The library is published to Maven Central.

Shared module build.gradle.kts

kotlin {
  cocoapods {
    version = "1.0.0"
    summary = "Shared module"
    homepage = "not published"
    ios.deploymentTarget = "11.0"
   
    pod("WebRTC-SDK") {
      version = "114.5735.02"
      linkOnly = true
    }
  
    podfile = project.file("../iosApp/Podfile")
  
    framework {
      baseName = "shared"
      export("com.shepeliev:webrtc-kmp:$webRtcKmpVersion")
      transitiveExport = true
    }
  
    xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
    xcodeConfigurationToNativeBuildType["CUSTOM_RELEASE"] = NativeBuildType.RELEASE
  }
 
  android()
  
  ios()
  iosSimulatorArm64()
 
  js {
   useCommonJs()
   browser()
  }
  
  sourceSets {
      val commonMain by getting {
          dependencies {
              api("com.shepeliev:webrtc-kmp:$webRtcKmpVersion")
          }
      }

      val iosMain by getting
      val iosSimulatorArm64Main by getting
      iosSimulatorArm64Main.dependsOn(iosMain)
  }
}

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

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

Usage

Please refer to sample.