API-Example-CSharp
其他语言版本: 简体中文
Overview
The API-Example-CSharp project is an open-source demo that will show you different scenes on how to integrate Agora SDK APIs into your project.
Any scene of this project can run successfully alone.
image_of_a_running_project
Project structure
The project uses a single app to combine a variety of functionalities.
- Basic demos:
Demo | Description | APIs |
---|---|---|
JoinChannelAudio | basic demo to show audio call | CreateAgoraRtcEngine, Initialize, JoinChannel, LeaveChannel |
JoinChannelVideo | basic demo to show video call | CreateAgoraRtcEngine, Initialize, EnableVideo, JoinChannel, LeaveChannel |
... | ... | ... |
- Advanced demos:
Demo | Description | APIs |
---|---|---|
JoinMultipleChannel | join from different channel | CreateAgoraRtcEngine, Initialize, SetChannelProfile, CreateChannel, SetClientRole, EnableAudio、EnableVideo、SetupLocalVideo, JoinChannel, Publish, LeaveChannel |
ProcessRawData | how to get raw data | CreateAgoraRtcEngine, Initialize, EnableAudio, EnableVideo, JoinChannel, LeaveChannel |
ScreenShare | screen share | CreateAgoraRtcEngine, Initialize, StartScreenCaptureByDisplayId, EnableVideo,JoinChannel, StopScreenCapture, LeaveChannel |
VideoGroup | users join a same channel | CreateAgoraRtcEngine, Initialize, EnableVideo, JoinChannel, LeaveChannel |
VirtualBackground | enable virtual background | CreateAgoraRtcEngine, Initialize, EnableVideo, EnableVirtualBackground, JoinChannel, LeaveChannel |
... | ... | ... |
How to run the sample project
Developer Environment Requirements
- Visual Studio 2019+ with C++ (Windows)
- .NET
Steps to run
Steps from cloning the code to running the project
First, create a developer account at Agora.io, and obtain an App ID. Then do the following:
-
Clone this repository.
git clone https://github.com/AgoraIO-Community/Agora-C_Sharp-SDK.git
-
Open
Agora-C_Sharp-SDK/CSharp-API_Example/CSharp-API_Example.sln
via Visual Studio. select x64 platform. Note that you will see compiler errors because you download the SDK package yet. -
You may download the SDK package by one of the following ways(recommend b):
a. Download Agora Video SDK for Windows. Unzip the downloaded SDK package and copy all the
.dll
files fromRTC/Agora_Native_SDK_for_Windows_FULL/libs/x86_64
andx64/Release
toAgora-C_Sharp-SDK/CSharp-API_Example/binx64/Debug/netcoreapp3.1
folder.b. In
Solution Explorer
, findCSharp-API_Example->Dependencies
and right click. Then selectManage NuGet Packages...
. ClickBrowse
button, searchagora_rtc_sdk
and install the package. -
Fill your App ID click "update" btn to save. Choose one of the scene that you want to run.
You are all set! Feel free to play with this sample project and explore features of the Agora RTC SDK.
Feedback
If you have any problems or suggestions regarding the sample projects, feel free to file an issue.
Reference
- You can find full API document at Document Center
- You can file issues about this demo at issue
- For advanced features such as screensharing and transcoding, please refer to this repo, which implements advanced guides in the documentation.
Related resources
- Check our FAQ to see if your issue has been recorded.
- Dive into Agora SDK Samples to see more tutorials
- Take a look at Agora Use Case for more complicated real use case
- Repositories managed by developer communities can be found at Agora Community
- If you encounter problems during integration, feel free to ask questions in Stack Overflow
License
The sample projects are under the MIT license.