DJI-Mobile-SDK-Tutorials / iOS-PlaybackDemo

A demo help you learn how to use DJI Mobile SDK to access the media resources in the SD card of the aircraft's camera to preview photos, play videos, download or delete files.
MIT License
10 stars 2 forks source link

PlaybackDemo Tutorial Bug #1

Closed ryanhoy closed 8 years ago

ryanhoy commented 8 years ago

Hello!

I've been following your tutorial to the point where we set the camera mode to DJICameraModePlayback inside the -(IBAction) changeWorkModeAction:(id)sender method. I go about testing it on a DJI Phantom 3 Standard platform and this is the error that I get:

Error Domain=DJISDKErrorDomain Code=-1000 "This feature is not supported in the SDK(code:-1000)" UserInfo={NSLocalizedDescription=This feature is not supported in the SDK(code:-1000)}

I checked the API for your guy's SDK but, it doesn't mention anything about compatibility. Does this really mean that playback mode is not supported on a DJI Phantom 3 standard?

dji-dev commented 8 years ago

Hi, currently, DJI Phantom 3 Standard does not support DJICameraModePlayback, you can use DJICameraModeMediaDownload to access the media data instead. Please check the following Enum in DJICameraSettingsDef.h file:

//-----------------------------------------------------------------
#pragma mark DJICameraMode
//-----------------------------------------------------------------
/**
 *  Camera work modes.
 */
typedef NS_ENUM (NSUInteger, DJICameraMode){
    /**
     *  Capture mode. In this mode, the user can capture pictures.
     */
    DJICameraModeShootPhoto = 0x00,
    /**
     *  Record mode. In this mode, the user can record videos.
     */
    DJICameraModeRecordVideo = 0x01,
    /**
     *  Playback mode. In this mode, the user can preview photos and videos, and
     *  can delete files.
     *
     *  Not supported by Osmo, Phantom 3 Standard or Phantom 3 4K.
     */
    DJICameraModePlayback = 0x02,
    /**
     *  In this mode, the user can download media to the Mobile Device.
     *
     *  Supported by Phantom 3 Professional, Phantom 3 Advanced, Phantom 3 Standard, X3.
     */
    DJICameraModeMediaDownload = 0x03,

    /**
     *  The camera work mode is unknown.
     */
    DJICameraModeUnknown = 0xFF
};
ryanhoy commented 8 years ago

Great, that answers my question! Thanks!