Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

tkmn0/SimpleWebRTCExample_iOS

Open more actions menu

Repository files navigation

SimpleWebRTCExample

This is simple WebRTC Exmaple project for iOS written in Swift. result

Feature

  • Super simple WebRTC example project written in Swift.
  • Example command lines to build WebRTC.framework.here
  • Includes prebuild WebRTC.framework here. (This is for TEST ONLY.) THIS IS REMOVED.
  • Datachannel implementation (text and bytes).
  • File Source implementation.
  • Camera position switching(tap local camera view.)
  • Includes super simple signaling server written in node.js.

Dependency

Setup

  • You need to add WebRTC.framework to your xcode project. see how_to_add If you want to build WebRTC.framework and use it, see how_to_add. Currently, this project uses GoogleWebRTC installed via pod.
  • pod install
  • You need to setup signaling server.
    This project includes simple one at SimpleWebRTCExample_iOS/SignalingServer/.
    You can setup node.js as folows.
    • cd SimpleWebRTCExample_iOS/SignalingServer
    • npm install

Usage

  • Firstly, run the signaling server as folows.
    • cd SimpleWebRTCExample_iOS/SignalingServer
    • node server.js node.js server will start at 8080 port.
  • Change signaling server url ( the ipAddress String vallue) to your case in ViewController.swift. You can find your signaling server url in signaling server log.
  • Then, run SinmpleWebRTC on your device or simulator. This example need totaly two devices(simulator & simulator is OK)
  • Check websocket connection state on your device. If it is connected, you can tap call button. WebRTC will be connected.
  • You can send like with like button. You can send plain messages with message button.
  • Enjoy.

Licence

This software is released under the MIT License, see LICENSE.

About

Simple example for WebRTC on iOS written in swift5

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.