Live Streaming

Full Version: SVC questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
I just bought today your SVC software and first of all, congrats, it is an amazing software and quite easy to make it works (It just took me 5 mins).

I have some questions I hope you can help me with:

a) I couldnĀ“t find the code (or the way) to log-in into the app through Facebook or a form filling in my details as you do it in your demo. Where can I find that code?? Since it is a feature you promote in your web i guess it is included in the package, right?

b) If i want to set-up a direct webcam meeting instead of a random one, how should I do it??

c) I just bought your single SVC version, but since I really like your software after trying it, I would also pay for the future updates, where or how could I pay the extra 30$ to get future updates? Smile

Thank you very much for your interest and support!

Best regards!
Hello borja,

a. the SVC software is ready to receive information from facebook (and any other platform like Joomla, WordPress or custom code) will request an example below
b. this is already possible with the SVC core but due to some unfinished coding hasn't been released yet. You can use a list of online users and call anyone with a click, there is a built-in list in SVC (flash). The online username can be called via 3rd party script (php sample and WordPress plugin will be provided) that gathers online-user data directly from the database. Expected in early 2012.
c. I don't know about this one, you should contact the seller
Here is the relevant code we use to request facebook info and pass it to SVC (it won't work with older versions of SVC or RVC since the software needs to be ready to understand these values):

1. gather the data from facebook (and display some of it)
PHP Code:
<?php

require_once('facebook.php'); // contains facebook appID and Secret
require_once('facebook-php-sdk/facebook.php');

function 
getAge($p_strDate) {
    list(
$d,$m,$Y) = explode("/",$p_strDate);
    return (
date("md") < $m $d date("Y") - $Y date("Y") - $Y);
}

$facebook = new Facebook(array(
    
'appId' => $svcfb_appID,
    
'secret' => $svcfb_secret,
    
'cookie' => true,
));

$session $facebook->getSession();

$me null;
$friends null;

if (
$session) {
    try {
        
//$uid = $facebook->getUser();
        
$me $facebook->api('/me');
        if ( 
$me['location'] ) {
            
$me['country'] = $me['location']['name'];
            
$me['country_id'] = $me['location']['id'];
        } else if ( 
$me['hometown'] ) {
            
$me['country'] = $me['hometown']['name'];
            
$me['country_id'] = $me['hometown']['id'];
        } else {
            
$me['country'] = "N/A";
            
$me['country_id'] = "";
        }
        
$me['age'] = getAge($me['birthday']);
        
    } catch (
FacebookApiException $e) {
        
error_log($e);
    }
}

function 
show_me($me) {
    
    
$name $me['name'];
    
$first_name $me['first_name'];
    
$uid $me['id'];
    
$href $me['link'];
    
$gender $me['gender'];
    
$picture "https://graph.facebook.com/" $uid "/picture?type=square";
    
$country $me['country'];
    
    echo 
'
    <div style="float:left; width:50px; height:50px;">
        <a href="' 
$href '"><img alt="' $name '" src="' $picture '" width="50" height="50" class="fbpicture"></a>
    </div>
    <div style="float:left; width:114px; height:50px; padding-left:6px;">
        <span class="description">
            Logged in as<br/>
            <a href="' 
$href '" target="_blank" class="title">' $first_name '</a><br/>
            (' 
$gender ')<br/>
            ' 
$country '
        </span>
    </div>
    <div style="clear:both;"></div>
    '
;
}
?>

2. pass data to SVC as flash variables
PHP Code:
<script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
            <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. --> 
            var swfVersionStr = "10.0.0";
            <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
            var xiSwfUrlStr = "playerProductInstall.swf";
            var flashvars = {};
            <?php if ( !empty($me) ): ?>
                flashvars.userName = "<?php echo $me['first_name']; ?>";
                flashvars.sex = "<?php echo $me['gender']; ?>";
                flashvars.age = "<?php echo $me['age']; ?>";
                flashvars.country = "<?php echo $me['country']; ?>";
                flashvars.country_id = "<?php echo $me['country_id']; ?>";
                flashvars.id = "<?php echo $me['id']; ?>";
            <?php endif ?>
            
            var params = {};
            params.quality = "high";
            params.bgcolor = "#ffffff";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            params.wmode = "transparent";
            
            var attributes = {};
            attributes.id = "VideoChat";
            attributes.name = "VideoChat";
            attributes.align = "middle";
            
            swfobject.embedSWF(
                "VideoChat.swf", "flashContent", 
                "760", "450", 
                swfVersionStr, xiSwfUrlStr, 
                flashvars, params, attributes);
            <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");
        </script> 

For logging users in with facebook, here is the solution we used: http://developers.facebook.com/docs/authentication/
Thank you very much for your support and rapid answer! It is highly appreciated!

I have two extra quick questions about this matter:

a) You said: "You can use a list of online users and call anyone with a click, there is a built-in list in SVC (flash)." <-- where can I find this piece of code??!

b) Thanks to your answer I understood that I can send some params to Flash with the "flashvars" variable, but how can I manage those params from the code in flash builder??

I mean, even when I use this in my code: flashvars.userName = "Borja"; and send it to the flash app, when I run the app I appear as "Connected as UNKNOWN". How can I manage the flash code to appear as "Connected as Borja"???

c) Do you have a sample code to create a filter with SVC, for example filters by age or city??

Thank you very much!
(12-28-2011, 04:23 PM)Video Chat Wrote: [ -> ]Hello borja,

a. the SVC software is ready to receive information from facebook (and any other platform like Joomla, WordPress or custom code) will request an example below
b. this is already possible with the SVC core but due to some unfinished coding hasn't been released yet. You can use a list of online users and call anyone with a click, there is a built-in list in SVC (flash). The online username can be called via 3rd party script (php sample and WordPress plugin will be provided) that gathers online-user data directly from the database. Expected in early 2012.
c. I don't know about this one, you should contact the seller

Is there a way to just have people that come on a website be able to get on the chat? I don't want to have random chats. Just specific people that are invited.
(12-31-2011, 01:04 AM)borja Wrote: [ -> ]Thank you very much for your support and rapid answer! It is highly appreciated!

I have two extra quick questions about this matter:

a) You said: "You can use a list of online users and call anyone with a click, there is a built-in list in SVC (flash)." <-- where can I find this piece of code??!

b) Thanks to your answer I understood that I can send some params to Flash with the "flashvars" variable, but how can I manage those params from the code in flash builder??

I mean, even when I use this in my code: flashvars.userName = "Borja"; and send it to the flash app, when I run the app I appear as "Connected as UNKNOWN". How can I manage the flash code to appear as "Connected as Borja"???

c) Do you have a sample code to create a filter with SVC, for example filters by age or city??

Thank you very much!


The "user list/phonebook call" feature wasn't released by the developer (yet). I did expect to have it in January but no update at the moment. It is there since we tested it months ago, if it is not released, it may be due to a bug or unfinished code.

The SVC handles everything in a much better (and simple) way, compared to RVC. You don't need to edit or modify the code in FB, the only thing needs editing is the javascript that passes the data to the software. This modification makes everyone capable of modifying the software without AS knowledge. If you pass your name to SVC it will use it as "username".

Filtering can be done (and makes more sense) outside the script, however a list of common used filters will be included in the stable 1.0 version, please don't ask me when. Here is a sample of the previous code (look for "mFilterSex"): http://code.google.com/p/video-chat/source/browse/trunk/src/JabberCam.as

(01-09-2012, 01:51 PM)SuperWebman Wrote: [ -> ]
(12-28-2011, 04:23 PM)Video Chat Wrote: [ -> ]Hello borja,

a. the SVC software is ready to receive information from facebook (and any other platform like Joomla, WordPress or custom code) will request an example below
b. this is already possible with the SVC core but due to some unfinished coding hasn't been released yet. You can use a list of online users and call anyone with a click, there is a built-in list in SVC (flash). The online username can be called via 3rd party script (php sample and WordPress plugin will be provided) that gathers online-user data directly from the database. Expected in early 2012.
c. I don't know about this one, you should contact the seller

Is there a way to just have people that come on a website be able to get on the chat? I don't want to have random chats. Just specific people that are invited.

Yes, use a login with pre-defined user/pass -combination or a Joomla!/WordPress login and a plugin that passes username to SVC and make SVC accessible for "Registered only". Btw, all the above is on the timeline and samples should be out soon.
Hi. I just bought SVC, but it seems to be different from demo version showing on the site. I can't find "drawing on screen" feature.
(12-28-2011, 04:42 PM)RVC Video Chat Wrote: [ -> ]Here is the relevant code we use to request facebook info and pass it to SVC (it won't work with older versions of SVC or RVC since the software needs to be ready to understand these values):

1. gather the data from facebook (and display some of it)
PHP Code:
<?php

require_once('facebook.php'); // contains facebook appID and Secret
require_once('facebook-php-sdk/facebook.php');

function 
getAge($p_strDate) {
    list(
$d,$m,$Y) = explode("/",$p_strDate);
    return (
date("md") < $m $d date("Y") - $Y date("Y") - $Y);
}

$facebook = new Facebook(array(
    
'appId' => $svcfb_appID,
    
'secret' => $svcfb_secret,
    
'cookie' => true,
));

$session $facebook->getSession();

$me null;
$friends null;

if (
$session) {
    try {
        
//$uid = $facebook->getUser();
        
$me $facebook->api('/me');
        if ( 
$me['location'] ) {
            
$me['country'] = $me['location']['name'];
            
$me['country_id'] = $me['location']['id'];
        } else if ( 
$me['hometown'] ) {
            
$me['country'] = $me['hometown']['name'];
            
$me['country_id'] = $me['hometown']['id'];
        } else {
            
$me['country'] = "N/A";
            
$me['country_id'] = "";
        }
        
$me['age'] = getAge($me['birthday']);
        
    } catch (
FacebookApiException $e) {
        
error_log($e);
    }
}

function 
show_me($me) {
    
    
$name $me['name'];
    
$first_name $me['first_name'];
    
$uid $me['id'];
    
$href $me['link'];
    
$gender $me['gender'];
    
$picture "https://graph.facebook.com/" $uid "/picture?type=square";
    
$country $me['country'];
    
    echo 
'
    <div style="float:left; width:50px; height:50px;">
        <a href="' 
$href '"><img alt="' $name '" src="' $picture '" width="50" height="50" class="fbpicture"></a>
    </div>
    <div style="float:left; width:114px; height:50px; padding-left:6px;">
        <span class="description">
            Logged in as<br/>
            <a href="' 
$href '" target="_blank" class="title">' $first_name '</a><br/>
            (' 
$gender ')<br/>
            ' 
$country '
        </span>
    </div>
    <div style="clear:both;"></div>
    '
;
}
?>

2. pass data to SVC as flash variables
PHP Code:
<script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
            <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. --> 
            var swfVersionStr = "10.0.0";
            <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
            var xiSwfUrlStr = "playerProductInstall.swf";
            var flashvars = {};
            <?php if ( !empty($me) ): ?>
                flashvars.userName = "<?php echo $me['first_name']; ?>";
                flashvars.sex = "<?php echo $me['gender']; ?>";
                flashvars.age = "<?php echo $me['age']; ?>";
                flashvars.country = "<?php echo $me['country']; ?>";
                flashvars.country_id = "<?php echo $me['country_id']; ?>";
                flashvars.id = "<?php echo $me['id']; ?>";
            <?php endif ?>
            
            var params = {};
            params.quality = "high";
            params.bgcolor = "#ffffff";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            params.wmode = "transparent";
            
            var attributes = {};
            attributes.id = "VideoChat";
            attributes.name = "VideoChat";
            attributes.align = "middle";
            
            swfobject.embedSWF(
                "VideoChat.swf", "flashContent", 
                "760", "450", 
                swfVersionStr, xiSwfUrlStr, 
                flashvars, params, attributes);
            <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");
        </script> 

For logging users in with facebook, here is the solution we used: http://developers.facebook.com/docs/authentication/

Please can you expecify in exacly in which file and line this 2 code has to be paste?
Pages: 1 2 3 4 5 6 7