AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones de flujo
  • Overview
  • Use example
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Overview
In this example, the application must manage a video conference between two computers. This application allows you to:
  • view the video currently being transmitted by the webcam installed on the current workstation.
  • view the video currently being transmitted by the webcam installed on the connected workstation.
  • transmit the voice of the current user to the connected user.
  • hear the voice of the connected user.
From version 20, Conference controls are supported in Windows Vista and later. If you want to use the Conference control with an earlier Windows version:
  1. Open the control description window.
  2. On the "UI" 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:
    • Click in the quick access buttons.
    • When the new element window appears, click "Window" then "Window".
  2. Create two conference control fields in this window: under the "Creación" pane, in the "Controles gráficos" group, pull down "Video y captura" and select "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 fields 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 EVENTS associated with the stream ("Code of associated stream" in the context menu of one of the Conference controls).
    Reminder: The "Request new stream connection" event is executed when a new stream attempts to connect with the current application. This event accepts one parameter. To handle this parameter, a procedure is automatically declared in the "Request for connecting a new stream" event.
  4. Add the following lines of code into the "Request for connecting a new stream" event:
    // 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 called "BTN_Appel": under the "Creación" pane, in the "Controles frecuentes" group, click on . This button will be used to connect the stream to a recipient.
    • create an input field named "SAI_AdresseCorrespondant": under the "Creación" pane, in the "Controles frecuentes" group, click on . This control will be used to enter the name of the person called.
    • create a button called "BTN_Terminer": under the "Creación" pane, in the "Controles frecuentes" group, click on .. This button will be used to end the reception or the broadcast of a stream.
    • create an edit control named "SAI_UserName": under the "Creación" pane, in the "Controles frecuentes" group, click on . This control will be used to enter the name of the current user.
  6. Write the following code in the "Click BTN_Call" event:
    // Specify the name of the caller
    Stream1.Identifier = EDT_UserName 
    // Connect the stream 
    StreamConnect(Stream1, RecipientAddress) 
    // equivalent to: 
    // Stream1.Address = RecipientAddress
  7. Write the following lines of code in the "Click BTN_Done" event:
    // Disconnect the stream
    StreamDisconnect(Stream1)
Note To work, this application must be run on two different workstations.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local