PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Use example
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
In this example, the application must manage a video conference between two computers. This application allows you to:
  • view the video currently broadcasted by the web camera installed on the current computer.
  • view the video currently broadcasted by the web camera installed on the connected computer.
  • transmit the voice of the current user to the connected user.
  • hear the voice of the connected user.
Caution: The Conference controls are no longer supported from Windows Vista.
Versions 20 and later
From version 20, the Conference controls are supported in Windows Vista and later. If you want to use the Conference control with an earlier Windows version:
  1. Display the description window of control.
  2. In the "GUI" tab, check "Use the TAPI 3.x APIs / Windows XP (for compatibility)".
  3. Validate.
New in version 20
From version 20, the Conference controls are supported in Windows Vista and later. If you want to use the Conference control with an earlier Windows version:
  1. Display the description window of control.
  2. In the "GUI" tab, check "Use the TAPI 3.x APIs / Windows XP (for compatibility)".
  3. Validate.
From version 20, the Conference controls are supported in Windows Vista and later. If you want to use the Conference control with an earlier Windows version:
  1. Display the description window of control.
  2. In the "GUI" tab, check "Use the TAPI 3.x APIs / Windows XP (for compatibility)".
  3. Validate.
Use example
To develop this application:
  1. Create a blank window ("File .. New .. Window ").Create a blank window:
    • Click among the quick access buttons.
    • Click "Window" in the wheel that is displayed. The window for creating a new element is displayed: click "Window" then "Window".
  2. Create two Conference controls in this window ("Insert .. Control .. Conference control"). In our example, the first control is named "CONF_Reception" and the second control is named "CONF_Transmission".
    Note: WINDEV automatically associates these two controls in the same stream. By default, the first created control is used to view the incoming video while the second created control is used to view the outgoing video.
    Create two Conference controls in this window: on the "Creation" pane, in the "Graphic controls" group, expand "Video and capture" and click "Conference". In our example, the first control is named "CONF_Reception" and the second control is named "CONF_Transmission".
    Note: WINDEV automatically associates these two controls in the same stream. By default, the first created control is used to view the incoming video while the second created control is used to view the outgoing video.
  3. Display the processes associated with the stream ("Code of associated stream" from the popup menu of one of the Conference controls).
    Reminder: The "Connection request from new stream" process is run when a new stream attempts to connect with the current application. This process accepts one parameter. To manage this parameter, a procedure is automatically declared in the "Request for connecting a new stream" process.
  4. Add the following code lines into the "Connection request from new stream" process:
    // Procedure used to detect a new stream
    // nStreamID is an integer variable containing  
    // the identifier of the detected stream
    PROCEDURE NewStream(nStreamID)  
    // Find out the name of the caller
    CallerName is string = StreamInfo(nStreamID, StreamCallerName)
    // Accept the incoming stream?
    IF YesNo(CallerName + "would like to start a conference with you", ...
    "Do you accept?") = Yes THEN
    StreamAccept(nStreamID, Reception)
    ELSE    
    StreamReject(nStreamID)
    END
  5. In the window:
    • create a button named "BTN_Call" ("Insert .. Control .. Button"). This button will be used to connect the stream to a recipient.
    • create an edit control named "EDT_RecipientAddress" ("Insert .. Control .. Edit control"). This control will be used to enter the name of the person called.
    • create a button named "BTN_Done" ("Insert .. Control .. Button"). This button will be used to end the reception or the broadcast of a stream.
    • create an edit control named "EDT_UserName" ("Insert .. Control .. Edit control"). This control will be used to enter the name of the current user.
    In the window:
    • create a button named "BTN_Call": on the "Creation" pane, in the "Usual controls" group, click . This button will be used to connect the stream to a recipient.
    • create an edit control named "EDT_RecipientAddress": on the "Creation" pane, in the "Usual controls" group, click . This control will be used to enter the name of the person called.
    • create a button named "BTN_Done": on the "Creation" pane, in the "Usual controls" group, click . This button will be used to end the reception or the broadcast of a stream.
    • create an edit control named "EDT_UserName": on the "Creation" pane, in the "Usual controls" group, click . This control will be used to enter the name of the current user.
  6. Enter the following code in the click process of the "BTN_Call" button:
    // Specify the name of the caller
    Stream1..Identifier = EDT_UserName
    // Connect the stream
    StreamConnect(Stream1, RecipientAddress)
    // equivalent to:
    // Stream1..Address = RecipientAddress
  7. Enter the following code lines in the click process of the "BTN_Done" button:
    // Disconnect the stream
    StreamDisconnect(Stream1)
Note: To operate, this application must run on two different computers.
Related Examples:
WD Video Conference Complete examples (WINDEV): WD Video Conference
[ + ] This example uses the Conference control and presents the use of sockets via an instant messaging.
WD Video conference enables you to start a conference (sound + video) with a remote user. Furthermore, with instant messaging, you have the ability to send a file to your contact and to dialog with him.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment