DJIPlaybackManager

@interface DJIPlaybackManager : NSObject

The playback manager is used to interact with the playback system of the camera. By using the playback manager, the user can control the playback system.

  • Returns the delegate of DJIPlaybackManager

    Declaration

    Objective-C

    @property (readwrite, nonatomic) id<DJIPlaybackDelegate> _Nullable delegate;
  • This enables the user to select, download, or delete multiple media files when the camera is in Playback mode.

    Declaration

    Objective-C

    - (void)enterMultipleEditMode;
  • Exits multiple edit mode.

    Declaration

    Objective-C

    - (void)exitMultipleEditMode;
  • Selects or unselects a file at the specified index of the current page. This index is unrelated to the filename, and is used in multiple edit mode.

    Declaration

    Objective-C

    - (void)toggleFileSelectionAtIndex:(int)index;

    Parameters

    index

    Index at which to select a file.

  • Selects all the files on the SD card.

    Declaration

    Objective-C

    - (void)selectAllFiles;
  • Unselects all the files on the SD card.

    Declaration

    Objective-C

    - (void)unselectAllFiles;
  • Selects all the file(s) on the current page.

    Declaration

    Objective-C

    - (void)selectAllFilesInPage;
  • Unselects all the file(s) on the current page.

    Declaration

    Objective-C

    - (void)unselectAllFilesInPage;
  • Deletes all selected files from the SD card.

    Declaration

    Objective-C

    - (void)deleteAllSelectedFiles;
  • Downloads the selected files. When this method is called, the dataBlock is called continuously until all the data is downloaded. The prepare and completion blocks are called once for each file being downloaded. In the prepareBlock, you can get the forthcoming file’s information, including the file name, file size, etc. If an error occurs, the overallCompletionBlock will be called with an error returned. If the entire download process finishes successfully, overallCompletionBlock will be called without any errors.

    Declaration

    Objective-C

    - (void)
    downloadSelectedFilesWithPreparation:
        (nullable DJIFileDownloadPreparingBlock)prepareBlock
                                 process:(nullable DJIFileDownloadingBlock)dataBlock
                          fileCompletion:(nullable DJIFileDownloadCompletionBlock)
                                             fileCompletionBlock
                       overallCompletion:
                           (nullable DJICompletionBlock)overallCompletionBlock;

    Parameters

    prepareBlock

    Callback to prepare each file for download.

    dataBlock

    Callback while a file is downloading. The dataBlock can be called multiple times for a file. The error argument in DJIFileDownloadingBlock is not used and should be ignored.

    fileCompletionBlock

    Callback after each file have been downloaded.

    finishBlock

    Callback after the downloading is finished.

  • Cancel current file download.

    Declaration

    Objective-C

    - (void)stopDownloadingFilesWithCompletion:(nullable DJICompletionBlock)block;

    Parameters

    block

    Callback after the operation finished.

  • Enables the user to preview multiple files when the camera is in Playback mode.

    Declaration

    Objective-C

    - (void)enterMultiplePreviewMode;
  • Goes to the next page when there are multiple pages.

    Declaration

    Objective-C

    - (void)goToNextMultiplePreviewPage;
  • Goes back to the previous page when there are multiple pages.

    Declaration

    Objective-C

    - (void)goToPreviousMultiplePreviewPage;
  • Enters single file preview mode for a file at the specified index. In order for this method to be called, the camera work mode must be DJICameraModePlayback.

    Declaration

    Objective-C

    - (void)enterSinglePreviewModeWithIndex:(uint8_t)index;

    Parameters

    index

    File to be previewed at the specified index.

  • Goes to the next page.

    Declaration

    Objective-C

    - (void)goToNextSinglePreviewPage;
  • Goes back to the previous page.

    Declaration

    Objective-C

    - (void)goToPreviousSinglePreviewPage;
  • Deletes the current file being previewed.

    Declaration

    Objective-C

    - (void)deleteCurrentPreviewFile;
  • Starts video playback. The selected file must be a video file.

    Declaration

    Objective-C

    - (void)startVideoPlayback;
  • Pause a video during playback.

    Declaration

    Objective-C

    - (void)pauseVideoPlayback;
  • Stops a video during playback

    Declaration

    Objective-C

    - (void)stopVideoPlayback;
  • Plays a video from the specified location.

    Declaration

    Objective-C

    - (void)setVideoPlaybackFromLocation:(uint8_t)location;

    Parameters

    location

    Location from which to play the video must be in the range of [0, 100]. This value represents at what percent of the entire video it should start playing.