Contact Us
Log In


Last Updated on : 2023-09-19 03:00:54download

Video playing

After startPreview is called, video images do not appear, and error messages are not returned. How do I deal with this problem?

  • Check whether the camera object is created.
    1. Check the error message that is returned in the cameraInitFailed: callback.
    2. If nil is returned for the camera object, check whether p2pType is 1.
    3. If p2pType is 1, import TuyaSmartCameraT. This module is no longer maintained. We recommend that you contact the manufacturer to update the IP camera (IPC) firmware.
  • Check whether a peer-to-peer (P2P) connection is created. startPreivew must be called after the callback cameraDidConnected: is executed.

How do I deal with the problem that audio output does not sync with video output?

We recommend that you contact the manufacturer to check whether the timestamps of audio frames match the timestamps of video frames.

How do I deal with the problem that SD card-stored video footage failed to be played back?

  • Before playback is started, the API request must be made to return the SD card-stored video clips generated on the current date.
  • Make sure that request parameters are correct. playTime must be startTime or later, and be earlier than endTime.

App crash

The app crashes after - (void)destory is called. How do I deal with this problem?

For legacy versions, when p2pType is 1, the app might crash after the destory method is called. This problem has been fixed in SDK v3.1.1 and later versions.

Before destory is called, stop the preview or callback operation and call disConnect to stop a P2P connection.

During the debugging with a simulator, the green screen of death (GSOD) appears, or certain IPCs crash when video images are previewed. How do I deal with this problem?

The simulator does not support the hardware decoding mechanism of certain IPCs. To fix this problem, use a real device for debugging instead.

After a third-party video solution along with Tuya IPC SDK is integrated into my project, a compiling error or app crash has occurred when the app is run. How do I deal with this problem?

This problem is caused by the conflict with the version of FFmpeg multimedia framework library. You package the existing video playback library into a dynamic library to fix the problem.

After the video is streamed, the app goes to the background, stays for a while, and then comes back to the foreground. This might cause the app to crash. How do I deal with this problem?

  1. Check whether the error message Terminated due to signal 13 is returned.
  2. Add the following code block to main.m:
    int main(int argc, char * argv[]) {
        @autoreleasepool {
                struct sigaction sa;
                sa.sa_handler = SIG_IGN;
                sa.sa_flags = 0;
                if (sigaction(SIGPIPE, &sa, NULL) < 0) {
                    perror("cannot ignore SIGPIPE");
                    return -1;
                return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));