Server/ Client Guide

BlueCam’s mantra is Peer-to-Peer.

Let’s examine the role of your server and the users’ browsers.
The server (PHP code) is responsible for creating the room. This gives the developer control over room creation and keeps user data secure.
PHP
include("php/BlueCam.php");
$roomId = $BlueCam->CreateRoom(array(
	"owner"=>"ownerUserId",
	"visitor"=>"visitorUserId"
));

echo $roomId;   //Give this to each of the users for JoinRoom()
//ng5u84o3583g

Other PHP Methods

The BlueCam PHP library also provides additional functions for fetching and updating room data in PHP:
  • getRoom($roomId)
  • getNewMessagesForUser($roomId, $userId)
  • markMessagesReceived($userId, $messageIds)
  • processMessage($roomId, $messageData, $from, $to)
  • closeRoom()
  • closeRoomForce()
  • getRooms($opts)

User Access

In most PHP applications, users log in to your system and you store their user ids with their PHP sessions. Once you've created a room in PHP, calll JoinRoom with each client browser. Here’s a simple example for learning the major mechanisms of BlueCam jQuery:
Note that we recommend using privateRoom.php, a complete, fully-featured private chatroom template designed to make it incredibly quick to install BlueCam within your system
Browser Support: BlueChat amplifies WebRTC compliant browsers and there are many great choices for users of all major PC operating systems(Windows, Mac, Ubuntu, Linux). Firefox, Chrome, and Opera are great modern browsers.