Last Updated on : 2025-01-02 10:29:23download
Two-way audio and video calls include two-way transmission and call capabilities extended based on the audio and video features. When the SDK sends a call request, it initiates live streaming and starts local audio and video capture. After the peer end answers the call and the P2P channel is connected, two-way audio and video data transmission is implemented.
IThingSmartCameraP2P createCameraP2P(String devId);
void connect(String devId, OperationDelegateCallBack callBack);
// Start live streaming
void startPreview(int definition, OperationDelegateCallBack callBack);
// Stop live streaming
void stopPreview(OperationDelegateCallBack callBack);
// Proactively disconnect
void disconnect(OperationDelegateCallBack callBack);
// Bind with a custom local video rendering view
void generateCameraView(T view);
// Start audio talk
void startAudioTalk(OperationDelegateCallBack callBack);
// Stop audio talk
void stopAudioTalk(OperationDelegateCallBack callBack);
// Enable local camera
boolean startVideoCapture();
// Disable local camera
void stopVideoCapture();
// Switch between cameras
boolean switchCamera();
// Start video talk
void startVideoTalk(OperationDelegateCallBack callBack);
// Stop video talk
void stopVideoTalk(OperationDelegateCallBack callBack);
// Pause video talk
void pauseVideoTalk(OperationDelegateCallBack callback);
// Resume video talk
void resumeVideoTalk(OperationDelegateCallBack callback);
You can refer to the complete process in the SDK sample.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback