- Use in network via Internet
WINDEV and the communication streams (audio, sound)
To handle the communication streams, WINDEV includes:
This allows two users to communicate between themselves. The image and the voice of the users are broadcasted in real time on each connected computer.
Examples of applications that use the streams:
- broadcast of a live press conference, ...
- The current computer and the connected computers must be equipped with a Web camera and/or a microphone. If one of the computers is not equipped with a Web camera or a microphone, the corresponding image or voice will not be broadcasted.
- Only the video sequences currently broadcasted by the Web cameras installed on the connected computers can be viewed. No video file can be viewed.
- Only the sounds currently broadcasted by the microphones installed on the connected computers can be listened to. No sound file can be listened to.
To handle the communication streams:
- Create a window containing on or more Conference controls. On the "Creation" tab, in the "Graphic controls" group, expand "Video and capture" and select "Conference".
- Display the description window of streams:
- on the "Window" tab, in the "Edit" group, expand "Other actions" and select "Edit streams".
- in the popup menu of the Conference control, select "Edit the window streams".
- In this window:
- Configure the characteristics of the Conference controls: type of outgoing and incoming data, display of the outgoing or incoming video, ...
Remark: These characteristics can also be set programmatically (IncomingData, OutgoingData, Identifier and Display properties).
- Associate (if necessary) the different Conference controls with the corresponding communication streams.
- Enable the detection of incoming streams (Detection property or "Detection of incoming streams enabled" option in the description window of the streams).
- Through programming:
- You can temporarily stop receiving or sending a type of data (sound or video) in the communication stream (StreamStop). To resume receiving or sending this type of data in the stream, use StreamPlay.
- Each connection attempt of a stream (StreamConnect function or Address property) uses a maximum connection timeout. To identify and/or modify this timeout, use the Timeout property.
Use in network via Internet
The Conference controls can be used between two computers:
- in the same local network: no specific configuration is required.
- via the Internet. In this case, a specific setting must be performed before using the StreamXXX functions.
The use of Conference controls in a different private network via Internet uses the WebRTC technology. This technology requires the use of a STUN server and a TURN server.
These servers must be configured properly.
- Some STUN servers can be free.
- The TURN servers that can be directly used are charged for.
The sources of a TURN server can be free. In this case, you must recompile them and deploy the server (a good knowledge of the programming language of the TURN server is required to perform these operations).
To use the Conference controls via Internet:
- Open the following ports in the firewall:
- TCP 29172: This port is specific to WINDEV and it must be opened in entry and exit. This port must be "linked" the the computer that performs the video-conference.
- Depending on the firewall configuration, you may also have to open the UDP 3478 port: This port is used by the TURN server for the relay of audio and video frames.
- Configure the STUN and/or TURN servers via StreamConfigure before opening the window containing the Conference controls. For example:
StreamConfigure("stun.l.google.com:19302", "myturnserver.org", "user87", "Secret_87")
Unit examples (WINDEV): The Conference control
[ + ]
Using the "Conference" control:
- Establish the connection with another user
- Communicate (image and sound) with another user via network
- Close a connection
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.