/Agora-C_Sharp-SDK

The simple ways to use Agora RTC SDK with C#

Primary LanguageC#

APIExample

其他语言版本: 简体中文

Overview

The APIExample 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

snapshot.png

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

| CustomCaptureVideo | custom capture video | CreateAgoraRtcEngine, Initialize, EnableVideo, SetExternalVideoSource, JoinChannel, PushVideoFrame, LeaveChannel | | AudioMixing | audio ,ixing | CreateAgoraRtcEngine, Initialize, EnableAudio, StartAudioMixing, JoinChannel, StopAudioMixing, LeaveChannel | | ChannelMediaRelay | channel media relay | CreateAgoraRtcEngine, Initialize, EnableVideo, JoinChannel,startChannelMediaRelay, stopChannelMediaRelay, LeaveChannel | | DeviceManager | device manager | CreateAgoraRtcEngine, Initialize, EnableAudio, EnableVideo, GetAgoraRtcVideoDeviceManager JoinChannel, GetAgoraRtcAudioPlaybackDeviceManager, GetAgoraRtcAudioRecordingDeviceManager,EnumerateVideoDevices, EnumeratePlaybackDevices EnumerateRecordingDevices,, LeaveChannel | | PlayEffect | audio effect | CreateAgoraRtcEngine, Initialize, EnableAudio, JoinChannel , PlayEffect, PauseEffect, ResumeEffect, StopEffect , LeaveChannel | RtmpStreaming | rtmp streaming | CreateAgoraRtcEngine, Initialize, EnableVideo, AddPublishStreamUrl, JoinChannel, RemovePublishStreamUrl, LeaveChannel | | SetEncryption | set ecnrypt | CreateAgoraRtcEngine, Initialize, EnableVideo, EnableEncryptionMode, JoinChannel, LeaveChannel | | SetLiveTranscoding | live transcoding | CreateAgoraRtcEngine, Initialize, EnableVideo, AddPublishStreamUrl,SetLiveTranscoding, JoinChannel, RemovePublishStreamUrl, LeaveChannel | | StreamMessage | send stream message | CreateAgoraRtcEngine, Initialize, EnableVideo, JoinChannel, sendStreamMessage, LeaveChannel | | VoiceChanger | voice changer | CreateAgoraRtcEngine, Initialize, EnableVideo, SetVoiceBeautifierPreset, SetAudioEffectPreset, JoinChannel, SetVoiceBeautifierParameters, SetAudioEffectParameters, StopVoiceChanger, LeaveChannel | | StringUid | string uid | CreateAgoraRtcEngine, Initialize, EnableVideo, JoinChannelWithUserAccount, 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:

  1. Clone this repository.

    git clone https://github.com/AgoraIO/Agora-C_Sharp-SDK.git
  2. Open Agora-C_Sharp-SDK/CSharp-API_Example/APIExample.sln via Visual Studio. select x86 or x64 platform. Note that you will see compiler errors because you download the SDK package yet.

    git checkout release/3.6.2
  3. Visual studio will download SDK nuget package when you build APIExample at first time.

    Note APIExample has been configured SDK nuget package dependeicies. If building your example, you need Manage Nuget Package on your example denpendencies. Input agora_rtc_sdk in Browse edit and select the corresponding version.

  4. 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.