其他语言版本: 简体中文
The API Example Windows Sample App is an open-source demo that show common API usage.
This demo is written in C++
- VS 2013(or higher), default is vs2017
- Windows 7(or higher)
To build and run the sample application, get an App ID:
-
Create a developer account at agora.io. Once you finish the signup process, you will be redirected to the Dashboard.
-
Navigate in the Dashboard tree on the left to Projects > Project List.
-
Save the App ID from the Dashboard for later use.
-
Generate a temp Access Token (valid for 24 hours) from dashboard page with given channel name, save for later use.
-
Define the APP_ID with your App ID.
#define APP_ID _T("Your App ID") #define APP_TOKEN _T("Your Token")
-
(Optional)Alternate approach to setup your APPID is to create an AppId.ini file under Debug/Release. Modify the appId value to the App ID you just applied.
#[AppID] #AppID=xxxxxxxxxxxxxxxxxxx
This open source sample project uses the Agora RTC SDK,DirectShow SDK, and MeidaPlayer SDK.
You can directly run APIExample/installThirdParty.bat
to automatically environment configuration.Once the configuration is complete, open the project with VS2017, select the x86 version to compile and run.
- change client role
- support 1v1,1v3, 1v8, 1v15
- join/leave channel
- render local and remote video
- Add publish stream url after join channel success
- remove publish stream url before leave channel
- show information returned by rtmp streaming callback
- inject stream url after join channel success
- show information returned by inject status callback
- Receive 666 jonied callback after inject stream url succeed.You can mute video and audio of 666. Also,you can render it.
- remove inject stream url before leave channel
- You need enable video and joinchannel.
- Send video SEI information. The maximum is 1024 byte.
- Receive SEI information and show it.
- Clear SEI information
- Enter the channel and enumerate all visible Windows
- Select a visible window
- Recording screen
- Stop recording
- Set profile
- Set scenario
- Set audio property to channel audio
- Set the audio path
- Set the number of playback times
- Sets whether to play locally only
- Sets whether to replace the microphone audio
- Camera capture using DirectShow
- Enumerates all image acquisition devices and types
- Create image acquisition filters
- Start collecting camera data
- SDK acquires camera data
- Stop collecting camera data
- Sign up as a video observer
- Process video frames in onCaptureVideoFrame
- Audio acquisition using DirectShow
- Enumerates all audio acquisition devices and types
- Create audio capture filters
- Start collecting microphone data
- SDK gets microphone data
- Stop collecting microphone data
- Register Audio Observer
- Process Audio Frames in onRecordAudioFrame
- Register Packet Observer
- Encrypt the audio stream before sending it in onSendAudioPacket
- Encrypt the video stream before it is sent in the onSendVideoPacket
- Decrypt the audio stream after receiving it in onReceiveAudioPacket
- Decrypt a video stream after receiving it from an onReceiveVideoPacket
- For potential issues, take a look at our FAQ first
- 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
- You can find full API documentation at Document Center
- If you encounter problems during integration, you can ask question in Stack Overflow
- You can file bugs about this sample at issue
The MIT License (MIT).