All Projects → Ankit-Aggarwal → Swiftywebrtc

Ankit-Aggarwal / Swiftywebrtc

Licence: mit
Swift Framework for WebRTC

Programming Languages

swift3
66 projects

Projects that are alternatives of or similar to Swiftywebrtc

Webrtc Leak
Check if your VPN leaks your IP address via the WebRTC technology
Stars: ✭ 133 (-9.52%)
Mutual labels:  webrtc
Restcomm Android Sdk
Android Mobile SDK to easily integrate communication features (WebRTC, messaging, presence, voice, video, screensharing) based on RestComm into native Mobile Applications
Stars: ✭ 139 (-5.44%)
Mutual labels:  webrtc
Nile.js
Server
Stars: ✭ 1,757 (+1095.24%)
Mutual labels:  webrtc
Metastream
Watch streaming media with friends.
Stars: ✭ 1,926 (+1210.2%)
Mutual labels:  webrtc
Liowebrtc
An event-based WebRTC library that makes it easy to embed real-time peer to peer communication into UI components.
Stars: ✭ 138 (-6.12%)
Mutual labels:  webrtc
Nes Rust
NES emulator written in Rust + WASM
Stars: ✭ 141 (-4.08%)
Mutual labels:  webrtc
Html5 Dash Hls Rtmp
🌻 HTML5播放器、M3U8直播/点播、RTMP直播、低延迟、推流/播流地址鉴权
Stars: ✭ 1,805 (+1127.89%)
Mutual labels:  webrtc
Srs
SRS is a simple, high efficiency and realtime video server, supports RTMP, WebRTC, HLS, HTTP-FLV, SRT and GB28181.
Stars: ✭ 16,734 (+11283.67%)
Mutual labels:  webrtc
Awesome Android Ndk
🔥 全面深入地掌握NDK技术,成为下一波5G时代的浪潮儿~
Stars: ✭ 138 (-6.12%)
Mutual labels:  webrtc
Enslavism
A framework to manage distributed WebRTC servers that communicate with browser clients
Stars: ✭ 143 (-2.72%)
Mutual labels:  webrtc
Webrtc Cli
WebRTC command-line peer.
Stars: ✭ 135 (-8.16%)
Mutual labels:  webrtc
Quic
A Go implementation of the QUIC API for Peer-to-peer and Client-to-Server Connections
Stars: ✭ 137 (-6.8%)
Mutual labels:  webrtc
Snowflake
WebRTC Pluggable Transport
Stars: ✭ 141 (-4.08%)
Mutual labels:  webrtc
Pinlayout
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]
Stars: ✭ 1,870 (+1172.11%)
Mutual labels:  swift-framework
Littlechat
A peer-to-peer video chat application made using Phoenix, LiveView, and WebRTC. Want to know how it's made? Read the blog post: https://littlelines.com/blog/2020/07/06/building-a-video-chat-app-in-phoenix-liveview
Stars: ✭ 144 (-2.04%)
Mutual labels:  webrtc
Contentful.swift
A delightful Swift interface to Contentful's content delivery API.
Stars: ✭ 132 (-10.2%)
Mutual labels:  swift-framework
Media Server Go Demo
webrtc media server go demo
Stars: ✭ 140 (-4.76%)
Mutual labels:  webrtc
Bookstore Ios
 Sample iOS App - A collection of examples and patterns for Unit Testing, UI Testing, handling Result/Optionals, writing documentation, and more. Details in README.
Stars: ✭ 147 (+0%)
Mutual labels:  swift-framework
Wt Tracker
High-performance WebTorrent tracker
Stars: ✭ 144 (-2.04%)
Mutual labels:  webrtc
Stun
A Go implementation of STUN
Stars: ✭ 141 (-4.08%)
Mutual labels:  webrtc

SwiftyWebRTC

As the name suggests, this is an framework for iOS implementation of the Google WebRTC framework, it contains build in WebRTC.Framework and RTCClient (written in swift) to let you easily add video/audio call capability to your app.

About

This Framework provides you with a resuable wrapper written in swift (swift3) for comfortable and easy using of Google WebRTC framework and making your ios app video call enabled. WebRTC is an open-source project (libjingle_peerConnection) maintained by google with high-level API implementations for both iOS and Android. WebRTC api can be read from here. WebRTC Framework used in project has been build from here

If you want to know about the wrapper implementation that can be checked from my blog in here

Source

Carthage

Framework can be added using following to your cartfile

github "Ankit-Aggarwal/SwiftyWebRTC" 

Usage:

Integration RTCClient to your controller is easy.

  1. You need to add following two properties to your controller
    var videoClient: RTCClient?
    var captureController: RTCCapturer! // custom capturer that can be used to switch camera (front/back camera)
  1. Configure Client:
    func configureVideoClient() {
    // You can pass on iceServers your app wanna use 
    // RTCClient can be used for only audio call also where videoCall is by default
        let client = RTCClient(iceServers: iceServers, videoCall: true)
        client.delegate = self
        self.videoClient = client
        client.startConnection()
    }
  1. Your controller needs to conform to RTCClientDelegate, which will help your client to interact with server for passing info
extension VideoChatViewController: RTCClientDelegate {

    func rtcClient(client: RTCClient, didCreateLocalCapturer capturer: RTCCameraVideoCapturer) {
    // To handle when camera is not available
        if UIDevice.current.modelName != "Simulator" {
            let settingsModel = RTCCapturerSettingsModel()
            self.captureController = RTCCapturer.init(withCapturer: capturer, settingsModel: settingsModel)
            captureController.startCapture()
        }
    }
    
    func rtcClient(client : RTCClient, didReceiveError error: Error) {
        // Error Received
        }
    }

    func rtcClient(client : RTCClient, didGenerateIceCandidate iceCandidate: RTCIceCandidate) {
     // iceCandidate generated, pass this to other user using any signal method your app uses
    }

    func rtcClient(client : RTCClient, startCallWithSdp sdp: String) {
       // SDP generated, pass this to other user using any signal method your app uses
    }

    func rtcClient(client : RTCClient, didReceiveLocalVideoTrack localVideoTrack: RTCVideoTrack) {
    // Use localVideoTrack generated for rendering stream to remoteVideoView
        localVideoTrack.add(self.localVideoView)
        self.localVideoTrack = localVideoTrack
    }
    func rtcClient(client : RTCClient, didReceiveRemoteVideoTrack remoteVideoTrack: RTCVideoTrack) {
    // Use remoteVideoTrack generated for rendering stream to remoteVideoView
        remoteVideoTrack.add(self.remoteVideoView)
        self.remoteVideoTrack = remoteVideoTrack
    }
}
  1. After setting all this, you can easily switch between front/back camera as follows
        self.captureController.switchCamera()

This is all you need to let the data flowing :)

Contributing

If you'd like to contribute, please fork the repository and issue pull requests. If you have any special requests and want to collaborate, please contact me directly. Thanks!

May add a example project in the repo, depending on the requests i get...

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].