The Agora RTC Native SDK provides both Push and Media IO methods to implement custom video capture. This page describes how to switch from custom video capture to SDK capture.
If you want to switch from custom video capture by Media IO to SDK capture, you can use one of the following methods.
You can switch custom video capture to SDK capture directly in the channel:
// Java
ENGINE.setVideoSource(new AgoraDefaultSource());
// Swift
agoraKit?.setVideoSource(AgoraRtcDefaultCamera());
// Objective-C
[self.agoraKit setVideoSource:[[AgoraRtcDefaultCamera alloc] initWithPosition:AgoraRtcDefaultCameraPositionFront]];
// C++
m_rtcEngine->setVideoSource();
m_rtcEngine->startPreview;
You can leave the current channel first, disable the custom video source, and then rejoin the channel. At this point, the SDK uses the default device for video capture.
If you want to switch from custom video capture by Push to SDK capture, you can leave the current channel first, disable the custom video source, and then rejoin the channel. At this point, the SDK uses the default device for video capture.