Communication Quickstart - Windows¶
Step 1: Download the Sample Code¶
The following shows the windows package structure:
- ./examples: including the Open Video Call application and Open Live sample codes（Open Video Call is for communication and Open Live is for live broadcast）
- ./sdk: including the required libraries
Step 2: Prepare the Environments¶
Ensure that the following development environment requirements are satisfied:
- Microsoft Visual C++ 2013 or later
- Microsoft Visual Studio (recommended)
- Microsoft Windows 7 or above
Be sure that the following libraries are ready.
- If you use the sample code downloaded in Step 1: Download the Sample Code , then no extra operation is required for this step.
- If you use the sample code downloaded from https://github.com/AgoraIO/OpenVideoCall-Windows:
- Add the sdk/include folder to the INCLUDE directory of your project.
- Add the sdk/lib folder to the LIB directory of your project, and make sure that mediasdk.lib is linked with your project.
- Copy all .dll files under the sdk/dll folder to the directory where your executable file is located.
Step 3: Demonstrate the Video Call¶
Agora provides a sample code called Open Video Call in the Agora Native SDK for Windows zip file.
Open Video Call includes the basic methods of joining and leaving a call, demonstrates the core operations of Agora Native SDK for Windows and enables audio and video calls with simple method calls.
The following figure highlights the required files to compile and execute the sample code:
- language: The configuration file to set the GUI display languages. The default language is English.
- OpenVideoCall: The source file folder of the sample code.
- OpenVideoCall.sln: The project file of the sample code.
- dll: The required dynamic link libraries.
Compiling the Sample Code¶
Do the following to compile and execute the sample code:
Open the OpenVideoCall.sln using the Visual Studio 2013 (or later).
Open the AgoraObject.h file and locate the line with #define APP_ID_T(“”) .
Enter your App ID. You can follow Obtaining an App ID to get your App ID.
Compile the entire solution in the Release mode.
Copy all the dynamic link libraries under the sdk/dll directory to the Release folder after the compilation is complete.
Executing the Sample Code¶
Double click the OpenVideoCall.exe and the following page displays:
On this page, you can set the resolution, test the devices, and set the encryptionkey if necessary.
Enter a channel name, for example, test, and proceed with Join.