BlueCam Overview

Our Vision

BlueCam’s main objective is to empower people to incorporate secure & private one-on-one video chat and real time peer to peer communication into their own web system without wasting team developers' time. Just download and go!
Tons of great video chat applications include: business, medical, education, industry, support, retail, etc...

PHP Creates Rooms and stores data in PostgreSQL

Create the private chat room by calling CreateRoom on your server
PHP
$BlueCam = new BlueCamAPI(array());
$roomId = $BlueCam->CreateRoom(array(
	"owner"=>"ownerUserId",
	"visitor"=>"visitorUserId"
));

JavaScript Connects Users and Brings them Together

Call JoinRoom with the userId and roomName to connect the users with WebRTC
Javascript
JoinRoom({
	localVideo:'localVideo',
	remoteVideo:'remoteVideo',
	roomName:roomName,
	userId:userId,
	muteAudioBtn:$('#muteAudioBtn'),
	muteVideoBtn:$('#muteVideoBtn'),
	callBtn:$(".callPeerBtn"),
	//Custom message handlers for peer-to-peer communication:
	onMessage: function(type, data) {
		if(type == "sharedTruth") {
			alert("A truth was shared with you: " + data);
		}
	},
	signalMethod:"php",  //Or "pubnub" w/ API creds:
	pubnubSubscribeKey:"Get-From-PubNub",
	pubnubPublishKey:"Get-From-PubNub",
	roomNotFoundCallback: function() {
		
	}
});
Once the video chat is secured, the browser can then communicate seemlessly using the sendMessage() function. BlueCam takes care of delivering messages and prioritizes to use the fastest method, WebRTC, but if the connection is down or not yet established will proxy the data to the recipient through your web server. BlueCam also supports PubNub integration if you are looking for a faster peer-to-peer fallback than php.
sendMessage takes two parameters: type(string) and data (string or object) and passes this to the other client:
Javascript
sendMessage("changedDrawing", {"circles":[], "rectangles":[], "triangles":[], "bgColor":"blue"});
sendMessage("shareTruth", "You Are Free");
BlueCam