0

Is it possible to Create live video and voice chat application in my website using WebRTC + PubNub. Any one can help me to find out a good existing code and how to integrate. I am using joomla 2.5. i need multiple and single channel video and audio streaming.

Shine
  • 882
  • 8
  • 15
  • Also you can checkout the PubNub **`WebRTC SDK`** https://github.com/stephenlb/webrtc-sdk and learn the basics of WebRTC Video and Voice calling - https://github.com/stephenlb/webrtc-sdk#the-basic-concepts-of-webrtc-calling – Stephen Blum Oct 17 '14 at 17:13
  • Please refer to this this SO thread for latest details: http://stackoverflow.com/questions/28740230/how-to-use-webrtc-pubnub-api-for-video-chat-client-in-native-android-app – Craig Conover Nov 13 '15 at 00:02

1 Answers1

2

Yea they have a demo on the site you have to signup to try. http://www.pubnub.com/developers/webrtc/

Looks like you write code with the WebRTC libraries, and in PubNub fashion, the PubNub library provides methods for both subscribing and listen for new connections. (The PubNub library comes with the functionality to see what users come online and offline.) Is this what you're looking for? A sort of chat presence with ability to call users who are available? If so, probably a good idea to use PubNub.

If you are really a WebRTC beginner and are trying to get basic video calling between your Joomla website users, you could try open source SIP.js (sipjs.com) and OnSIP. That's written on top of WebRTC and SIP. You can get a quick user at getonsip.com. Like this is what making a video call looks like (starts call on page load, click end button to end the call):

In HTML

<script src="http://sipjs.com/download/sip-0.6.3.min.js">

<video id="remoteVideo"></video>
<video id="localVideo" muted="muted"></video>
<button id="endCall">End Call</button>

In JavaScript:

var session;

var endButton = document.getElementById('endCall');
endButton.addEventListener("click", function () {
    session.bye();
    alert("Call Ended");
}, false);

//Creates the anonymous user agent so that you can make calls
var userAgent = new SIP.UA();

//here you determine whether the call has video and audio
var options = {
    media: {
        constraints: {
            audio: true,
            video: true
        },
        render: {
            remote: {
                video: document.getElementById('remoteVideo')
            },
            local: {
                video: document.getElementById('localVideo')
            }
        }
    }
};
//makes the call

session = userAgent.invite('sip:youruser@yourdomain.onsip.com', options);

You can sign up for a quick user address at getonsip.com and login to the end point.

HelloNicole
  • 99
  • 1
  • 3