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.
$roomId = $BlueCam->CreateRoom(array(
echo $roomId; //Give this to each of the users for JoinRoom()
Other PHP Methods
The BlueCam PHP library also provides additional functions for fetching and updating room data in PHP:
- getNewMessagesForUser($roomId, $userId)
- markMessagesReceived($userId, $messageIds)
- processMessage($roomId, $messageData, $from, $to)
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.