If you’re using a standard CMS like Drupal, WordPress, Joomla, Elgg, Moodle you can find some ready made integrations to start from, on VideoWhisper.com . Otherwise you should start from the plain php editions.
All integrations include full php in source form, that can be downloaded for free from the downloads section (after registering a free account).
Integration is not affected by the license. When domain is licensed flash application starts in full mode (without limitations and intrusive ads showing in flash interface).
Integration depends mainly on site developers and site logic. We recommend starting with the simple php editions when integrating with new scripts. If needed apps can be tweaked to call other types of scripts (asp, jsp). Most already include parameters to change external script call path and extension.
LOGIN
Flash applications call scripts ( _login.php : vc_login.php, lb_login.php, r_login.php …) to get start up parameters, user information (grant access), update user status.
These can be integrated as needed with site logic.
In example the login script could check cookies/sessions depending on site authentication type and allow user to access if logged in. Also this could populate username, gender and user permissions depending on user type.
The flash applications can also be embed in any html pages or templates for 3rd party scripts and some parameters like room name can be passed via a swf parameter like .swf?room=Test . Then flash will call the external scripts like login script where integration can be done as mentioned above.
Details about these calls (including explanations for multiple parameters you can pass) are listed on the php edition pages from VideoWhisper website:
http://www.videowhisper.com/?p=PHP-Video-Recorder-Script
http://www.videowhisper.com/?p=PHP-Live-Streaming
http://www.videowhisper.com/?p=PHP-Video-Conference
http://www.videowhisper.com/?p=PHP-Video-Consultation
http://www.videowhisper.com/?p=PHP-2-Way-Video-Chat
http://www.videowhisper.com/?p=PHP-Video-Messenger-Script
http://www.videowhisper.com/?p=PHP-Video-Live-Support
http://www.videowhisper.com/?p=Admin-Software
ONLINE SESSIONS
The applications can show timer/credits info and also communicate with scripts enabling access/disconnecting users as needed but logic must be implemented by site developers.
This can be used for keeping lists of online users, getting and controlling user time online.
If you want to integrate this functionality in your custom projects see php edition pages and references to the _status.php scripts for each.
Sample: Implementing an online channels list for Live Streaming
The php edition does not use any sql tables so you can easily install it and integrate with a database system of your choice.
You have to build the online channels list same way as it’s done for Joomla and WordPress:
Each broadcaster application calls lb_status.php (about each 10s depending on connection) . You need to add channel name to an online broadcasters table (mysql). If already there update access time to current time. Delete all rows that were not access recently (last 30s) because these users must have disconnected.
Here is how it’s done for wordpress integration:
$s=$_POST['s'];
$u=$_POST['u'];
$r=$_POST['r'];
$m=$_POST['m'];
$ztime=time();
$sql = “SELECT * FROM $table_name where session=’$s’ and status=’1′”;
$session = $wpdb->get_row($sql);
if (!$session)
{
$sql=”INSERT INTO `$table_name` ( `session`, `username`, `room`, `message`, `sdate`, `edate`, `status`, `type`) VALUES (‘$s’, ‘$u’, ‘$r’, ‘$m’, $ztime, $ztime, 1, 1)”;
$wpdb->query($sql);
}
else
{
$sql=”UPDATE `$table_name` set edate=$ztime, room=’$r’, username=’$u’, message=’$m’ where session=’$s’ and status=’1′”;
$wpdb->query($sql);
}
$exptime=$ztime-30;
$sql=”DELETE FROM `$table_name` WHERE edate < $exptime”;
$wpdb->query($sql);
This table is used:
CREATE TABLE `$table_name` (
`id` int(11) NOT NULL auto_increment,
`session` varchar(64) NOT NULL,
`username` varchar(64) NOT NULL,
`room` varchar(64) NOT NULL,
`message` text NOT NULL,
`sdate` int(11) NOT NULL,
`edate` int(11) NOT NULL,
`status` tinyint(4) NOT NULL,
`type` tinyint(4) NOT NULL,
PRIMARY KEY (`id`),
KEY `status` (`status`),
KEY `type` (`type`),
KEY `room` (`room`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=’Video Whisper: Sessions – 2009@videowhisper.com‘ AUTO_INCREMENT=1 ;”;
Related Posts: