<commit_before># WebRTC Simple Calling API + Mobile

At PubNub we believe in simplicity of our SDK usability.
We've taken a simplified approach to WebRTC Peer Connections by creating
and easy-to-use SDK for developers.
These ideas should span all platforms and devices too and
that's why we also support **Android** WebRTC mobile calling
with compatibility for iOS native Objective-C based WebRTC SDK.
Here we will start with a copy/paste example of our SDK.

### Simple Example Walkthrough

This Simple Example Comes in **Two WebRTC Calling Sections**.

 1. *Part One* will talk about how you can **Make a WebRTC Call**.
 2. *Part Two* will teach you about **Receiving a WebRTC Call**.

#### Making a WebRTC Call - *Part One*

Make your first html file named `dial.html` and copy/paste the following:

```html
<!-- dial.html -->

<!-- Video Output Zone -->
<div id="video-out"> Making a Call </div>

<!-- Libs and Scripts -->
<script src="https://cdn.pubnub.com/pubnub.min.js"></script>
<script src="http://stephenlb.github.io/webrtc-sdk/js/webrtc.js"></script>
<script>(function(){

    // Initialize the Phone
    // The phone number can by any string value
    var phone = PHONE({ number : '1234' });

    // As soon as the phone is ready we can make calls
    phone.ready(function(){

        // Dial a Number and get the Call Session
        var session = phone.dial('4321');

        // Call Connected
        session.connected(function(session){

            // Display Your Friend's Live Video
            PUBNUB.$('video-out').appendChild(session.video);

        });

    });

})();</script>
```

#### Receiving a WebRTC Call - *Part Two*

Make a Second Page called `receive.html` and copy/paste the following.

```html
<!-- receive.html -->

<!-- Video Output Zone -->
<div id="video-out"> Waiting for Call </div>

<!-- Libs and Scripts -->
<script src="https://cdn.pubnub.com/pubnub.min.js"></script>
<script src="http://stephenlb.github.io/webrtc-sdk/js/webrtc.js"></script>
<script>(function(){

    // Initialize the Phone
    // The phone number can by any string value
    var phone = PHONE({ number : '4321' });

    // When someone calls you
    phone.receive(function(session){

        // Session Connected
        session.connected(function(session){

            // Display Your Friend's Live Video
            PUBNUB.$('video-out').appendChild(session.video);

        });

    });

})();</script>
```

### Full Live Example

We have a live running WebRTC Demo which uses our WebRTC SDK.
This demo includes a soft-touch UI for an easy calling experience.

> try the **live WebRTC demo**:
[WebRTC Simple Calling API + Mobile](http://stephenlb.github.io/webrtc-sdk/)




TODOs
    -  supported devices list ios android chrom operaff
    - live demo ready to try
    - full SESSION and PHONE docs
    - idea section
    - getn your pubnub keys
    - landing page
    - add pubnub logo to demo
    - enable SSL
    - mobile Calling
    - 
    - 
    - 
    - 
    - 
    - 
    - 
    - 

PubNub WebRTC SDK - A 

                <li> SOS Button - Help! (Mayday)
                <li> instant calling<commit_msg>added image to README.md of screenshot demo app.<commit_after># WebRTC Simple Calling API + Mobile

At PubNub we believe in simplicity of our SDK usability.
We've taken a simplified approach to WebRTC Peer Connections by creating
and easy-to-use SDK for developers.
These ideas should span all platforms and devices too and
that's why we also support **Android** WebRTC mobile calling
with compatibility for iOS native Objective-C based WebRTC SDK.
Here we will start with a copy/paste example of our SDK.

### Simple Example Walkthrough

This Simple Example Comes in **Two WebRTC Calling Sections**.

 1. *Part One* will talk about how you can **Make a WebRTC Call**.
 2. *Part Two* will teach you about **Receiving a WebRTC Call**.

#### Making a WebRTC Call - *Part One*

Make your first html file named `dial.html` and copy/paste the following:

```html
<!-- dial.html -->

<!-- Video Output Zone -->
<div id="video-out"> Making a Call </div>

<!-- Libs and Scripts -->
<script src="https://cdn.pubnub.com/pubnub.min.js"></script>
<script src="http://stephenlb.github.io/webrtc-sdk/js/webrtc.js"></script>
<script>(function(){

    // Initialize the Phone
    // The phone number can by any string value
    var phone = PHONE({ number : '1234' });

    // As soon as the phone is ready we can make calls
    phone.ready(function(){

        // Dial a Number and get the Call Session
        var session = phone.dial('4321');

        // Call Connected
        session.connected(function(session){

            // Display Your Friend's Live Video
            PUBNUB.$('video-out').appendChild(session.video);

        });

    });

})();</script>
```

#### Receiving a WebRTC Call - *Part Two*

Make a Second Page called `receive.html` and copy/paste the following.

```html
<!-- receive.html -->

<!-- Video Output Zone -->
<div id="video-out"> Waiting for Call </div>

<!-- Libs and Scripts -->
<script src="https://cdn.pubnub.com/pubnub.min.js"></script>
<script src="http://stephenlb.github.io/webrtc-sdk/js/webrtc.js"></script>
<script>(function(){

    // Initialize the Phone
    // The phone number can by any string value
    var phone = PHONE({ number : '4321' });

    // When someone calls you
    phone.receive(function(session){

        // Session Connected
        session.connected(function(session){

            // Display Your Friend's Live Video
            PUBNUB.$('video-out').appendChild(session.video);

        });

    });

})();</script>
```

### Full Live Example

We have a live running WebRTC Demo which uses our WebRTC SDK.
This demo includes a soft-touch UI for an easy calling experience.

> try the **live WebRTC demo**:
[WebRTC Simple Calling API + Mobile](http://stephenlb.github.io/webrtc-sdk/)

[![WebRTC Simple Calling API + Mobile](http://pubnub.s3.amazonaws.com/assets/webrtc-simple-sdk-calling-api.png)](http://stephenlb.github.io/webrtc-sdk/)

You can click the link above to try our live WebRTC Demo
which is powered by our easy to use SDK.


TODOs
    -  supported devices list ios android chrom operaff
    - live demo ready to try
    - full SESSION and PHONE docs
    - idea section
    - getn your pubnub keys
    - landing page
    - add pubnub logo to demo
    - enable SSL
    - mobile Calling
    - 
    - 
    - 
    - 
    - 
    - 
    - 
    - 

PubNub WebRTC SDK - A 

                <li> SOS Button - Help! (Mayday)
                <li> instant calling
{'fraction_non_alphanumeric': 0.12522907758094073, 'fraction_numerical': 0.004428833231521075, 'mean_word_length': 2.660704304080492, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 53, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5762784', 'n_tokens_mistral': 2064, 'n_tokens_neox': 1893, 'n_words': 714}