legacy:clients_guides:webphone_sdk:start

Webphone SDK

The “Web Phone” is a flash video phone which allow to have a video call in a web browser.

Here is the HTML code to use to integrate the flashphone in an HTML page:

<script src="AC_OETags.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
        AC_FL_RunContent(
                    "src", "FlashPhone",
                    "width", "900",
                    "height", "600",
                    "align", "middle",
                    "id", "FlashPhone",
                    "quality", "high",
                    "bgcolor", "#ffffff",
                    "name", "FlasPhone",
                    "allowScriptAccess","sameDomain",
                    "type", "application/x-shockwave-flash",
                    "pluginspage", "http://www.adobe.com/go/getflashplayer",
                    "allowFullScreen", "true",
                    "flashVars","authName=user1&authPass=1234&gatewayURL=rtmp://borja.i6net.org&videoSize=qcif&audioCodec=Speex&encodeQuality=5&videoQuality=90&videoBandwidth=12000&videoFps=3"
    );
//
 -->
</script>

FullScreen mode :

This mode allow to affect the maximum size of the remote video image in the browser window. It's not a real full screen mode. The real fullscreen mode can be start by a double click in remote video area.

For fullscreen mode, you need to add this javascript code, to get the web browser window size. You have to give this size to flash application

// For flashphone fullscreen get the window browser size to pass it to flashphone
var viewportwidth;
var viewportheight;

if ('fullscreen' == 'fullscreen')
{
    // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
    if (typeof window.innerWidth != 'undefined')
    {
      viewportwidth = window.innerWidth,
      viewportheight = window.innerHeight
    }

    // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

    else if (typeof document.documentElement != 'undefined'
     && typeof document.documentElement.clientWidth !=
     'undefined' && document.documentElement.clientWidth != 0)
    {
       viewportwidth = document.documentElement.clientWidth,
       viewportheight = document.documentElement.clientHeight
    }

    // older versions of IE

    else
    {
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
    }
    //document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
    viewportwidth = viewportwidth - 20;
    viewportheight= viewportheight- 20;
}
else
{
    viewportwidth  = 530;
    viewportheight = 332;
}

...

    AC_FL_RunContent(
        "src", "playerProductInstall",
        "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
        
        "width", viewportwidth,
        "height", viewportheight,
        
        "align", "middle",
        "id", "FlashPhone",
        "quality", "high",
        "bgcolor", "#ffffff",
        "name", "FlashPhone",
        "allowScriptAccess","sameDomain",
        "flashVars", "look=fullscreen&defVideoUse=true&gatewayURL=rtmp://demo.i6net.org&videoSize=qcif&videoQuality=80&videoBandwidth=180000&autoCall=false&autoConnect=false",
        "type", "application/x-shockwave-flash",
        "pluginspage", "http://www.adobe.com/go/getflashplayer"
    );

The Web Phone is configurable to change the video and or audio quality. These parameters are passed to flash phone, in HTML code, via variables in flashVars field.

Here are the supported parameters (default values are in bold) :

Parameter Value/Range Version Mini Description
authName As you want all User id or pseudo to use to connect to the server.
authPass As you want all Your own password.
gatewayURL URL all RTMP server to connect
videoSize qcif/cif all Please check your RTMP latest relase to get more sizes options. For more information, contact our support.

QCIF = 176 × 144
CIF = 352 × 288
audioCodec Speex/NellyMoser all Audio Codec name to use
encodeQuality Values in kbits/s all The encoded speech quality when using the Speex codec. Possible values are from 0 to 10. The default value is 6. Higher numbers represent higher quality but require more bandwidth, as shown in the following table. The bit rate values that are listed represent net bit rates and do not include packetization overhead.

0 : 3.95
1 : 5.75
2 : 7.75
3 : 9.80
4 : 12.8
5 : 16.8
6 : 20.6
7 : 23.8
8 : 27.8
9 : 34.2
10 : 42.2
videoQuality [0-100] all An integer that specifies the required level of picture quality, as determined by the amount of compression being applied to each video frame. Acceptable values range from 1 (lowest quality, maximum compression) to 100 (highest quality, no compression). To specify that picture quality can vary as needed to avoid exceeding bandwidth, pass 0 for quality. The default value is 0.
videoBandwith Value in bytes/s all An integer that specifies the maximum amount of bandwidth that the current outgoing video feed can use, in bytes per second. To specify that video can use as much bandwidth as needed to maintain the value of quality, pass 0 for bandwidth. The default value is 16384.
videoFps Default 15 all
Number of frame per second to send
look default
basic
player
playeraudio
camera
fullscreen
simple
simple2
master
agent
half
half2
autologin
microtest
micro
audio
audiokeypad
audio2
audioimg
all

















V1-18
Use an other skin than default one
defVideoUse false / true all Set the default camera use
autoConnect false / true all Use authName and authPass to login automatically
autoAnswer false / true all Answer any call automatically
autoCall false / true all Auto dial default service at start-up. Set 'targetURL' parameter to set the called number
targetURL ou called all Number to call in autoCall mode
showDtmf false/true Display DTMF in popup when receive it
showCalled false/true Display called number in top left corner of remote video
showDuration false/true Display called number in top right corner of remote video
showImgHangupCall false/true Display Hangup/Call image, in case of Simple/FullScreen … look
showLogo false/true V1-23 Display i6net logo
showStatus false/true V1-23 Display status led (green/orange/red)
showshowKeypad false/true V1-23 Display keypad for look audioimg
imgCall string V1-23 Image filename for Call button. Relative path or URL
imgHangup string V1-23 Image filename for Hangup button. Relative path or URL
saveSettings false/true Save settings
addCalledToConnect false/true V1-17 Specific feature for direct calls
randomLogin false/true V1-18 Generate automatically a login, even if authName is set
checkMic false/true V1-19 Display an alert message if no microphone is detected
checkCam false/true V1-19 Display an alert message if no camera is detected
alrmMicam false/true V1-19 Send alarm to server if no microphone or camera are detected
dbgonline false/true V1-20 Allow to see debug traces by press F4 key


  • legacy/clients_guides/webphone_sdk/start.txt
  • Last modified: 2017/07/29 00:16
  • by javier