webrtcApiRTC is a library that allows a developer to easily integrate real-time communications (chat, audio, video) into a web or mobile application, using HTML and JavaScript.
Behind the scenes, the WebRTC technology is used : this means that the media flows are encrypted and exchanged in peer-to-peer when possible. Otherwise a media relay (TURN server) may be required

Anatomy of ApiRTC Call

Step 1: Initialize the connection

intro1_cmpLet’s say that we have a mobile user that wants to call a desktop user (Client 1 calling Client 2).
The signaling offer of the Client 1 goes through the signaling server (CCS), and is relayed to the desktop client who can choose to accept or refuse the call

Step 2: Initiate a call

intro2_cmpNow both clients are aware of the capabilities of each other (audio/video codecs supported for instance).
In a typical scenario they will at this point also be capable to “talk” to each other: the signaling server is essentially useless now. They are now capable to exchange their media (audio/video) flux between each other.

Step 3: Peer to peer media exchange

intro3_cmpAs we see with this simple example, the signalisation phase is absolutely crucial to establish calls. There are also many factors not presented in this simple example (differences between browsers, media constraints, fallback if there are firewalls…), but this simple scenario is helpful to understand the following tutorials.

To start using ApiRTC
The examples found in this page are also available on Github

List of tutorials

Simple ApiRTC call
Your very first ApiRTC call ! A complete but simple example to make a video call between two browsers.

Advanced ApiRTC call
Although ApiRTC provides nice defaults media controls, you may want to customize them. This tutorial walks you through modifying the presentation, and adding
custom code for specific events like call/hangup.

Simple instant messaging client
Videos are nice, but sometimes all you need is a simple chat. Create a simple chat box in this tutorial.

Presence management
You want to be alerted when a user connects or disconnect ? The presence management API is meant for that, and exchange messages between peers.

Using events
In the traditional JS way, ApiRTC is an event-oriented API.Learn how to integrate ApiRTC as a building block into your application.

Select media
Your users may have more that one webcam or microphone. How do we let them choose their preferred device ?

Group chat
Chatting is fun. Chatting together is better. Implement a multi-user chat system in no time !

A collaborative whiteboard. Reveal your artistic talents and draw in real-time with your contacts !

cordova plugin
ApiRTC on Cordova
This document describes how to use ApiRTC on Cordova & Phonegap to easily build WebRTC applications on Android or iOS.