Giter Club home page Giter Club logo

webrtc-ios's Introduction

WebRTC iOS framework

Contents

Installation

Cocoapods (add to Podfile):

pod "WebRTC"

Carthage (add to Cartfile):

github "Anakros/WebRTC-iOS"

Manual: just download framework from the latest release and copy it to your project

You can only use the binary release, because the whole WebRTC repository is ~12Gb of disk space

Unstable versions

Cocoapods (will install specified unstable version or any higher version):

pod "WebRTC", ">= 14093.0.0-master"

Carthage (there is no way to auto-update to the latest unstable version at the current moment, so you should specify corresponding version tag):

github "Anakros/WebRTC-iOS" "14093.0.0-master"

Usage

Swift

import WebRTC

let device = UIDevice.string(for: UIDevice.deviceType())

print(device)
print(RTCInitializeSSL())

Objective-C

@import WebRTC;

NSString *device = [UIDevice stringForDeviceType:[UIDevice deviceType]];

NSLog(@"%@", device);
NSLog(@"%d", RTCInitializeSSL());

Bitcode

Bitcode isn't supported in the upstream for now. So you should disable it in the project build settings.

Information

Built from https://chromium.googlesource.com/external/webrtc/ using webrtc/build/ios/build_ios_libs.sh script.

Following patches applied:

Hardware H264 support enabled

diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi
index 36a2dae..1332809 100644
--- a/webrtc/build/common.gypi
+++ b/webrtc/build/common.gypi
@@ -155,7 +155,7 @@
 
     # Enable this to use HW H.264 encoder/decoder on iOS/Mac PeerConnections.
     # Enabling this may break interop with Android clients that support H264.
-    'use_objc_h264%': 0,
+    'use_objc_h264%': 1,
 
     # Enable this to prevent extern symbols from being hidden on iOS builds.
     # The chromium settings we inherit hide symbols by default on Release

Provide default implementation for WebRTC metrics

diff --git a/webrtc/system_wrappers/system_wrappers.gyp b/webrtc/system_wrappers/system_wrappers.gyp
index ea8fdb6..4ff2bab 100644
--- a/webrtc/system_wrappers/system_wrappers.gyp
+++ b/webrtc/system_wrappers/system_wrappers.gyp
@@ -44,6 +44,7 @@
         'include/timestamp_extrapolator.h',
         'include/trace.h',
         'include/utf_util_win.h',
+        'include/metrics_default.h',
         'source/aligned_malloc.cc',
         'source/atomic32_win.cc',
         'source/clock.cc',
@@ -76,6 +77,7 @@
         'source/trace_posix.h',
         'source/trace_win.cc',
         'source/trace_win.h',
+        'source/metrics_default.cc',
       ],
       'conditions': [
         ['enable_data_logging==1', {

Links

WebRTC Homepage

WebRTC discussion group

CocoaDocs

CocoaPods Page

WebRTC Bug Tracker

webrtc-ios's People

Contributors

alexkmdev avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.