class DJIPlaybackManager
@interface DJIPlaybackManager : NSObject
Header: DJIPlaybackManager.h Inherits From: NSObject
Description:
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.
Class Members:
State Updates
property delegate
@property (nonatomic , weak ) id <DJIPlaybackDelegate> delegate
Header: DJIPlaybackManager.h
Description:
Returns the delegate of DJIPlaybackManager
See Also:
DJIPlaybackDelegate
Single Preview Mode
method enterSinglePreviewModeWithIndex
- (void )enterSinglePreviewModeWithIndex:(uint8_t)index
Header: DJIPlaybackManager.h
Description:
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
.
uint8_t index File to be previewed at the specified index. The value falls in [1,8].
method goToNextSinglePreviewPage
- (void )goToNextSinglePreviewPage
Header: DJIPlaybackManager.h
Description:
Goes to the next page. Precondition: The camera must enter Single File Preview Mode. Special case: If it is the last image, it will go to the first image.
method goToPreviousSinglePreviewPage
- (void )goToPreviousSinglePreviewPage
Header: DJIPlaybackManager.h
Description:
Goes back to the previous page. Precondition: The camera must enter Single File Preview Mode. Special case: If it is the first image, it will go to the last image.
method playVideo
Header: DJIPlaybackManager.h
Description:
Starts video playback. The selected file must be a video file. Precondition: The camera must enter Single Preview Mode. Post condition: If the video finishes playing, it will stop and go back to the beginning of the file.
method pauseVideo
Header: DJIPlaybackManager.h
Description:
Pauses a video during playback. Precondition: The video is being played.
method stopVideo
Header: DJIPlaybackManager.h
Description:
Stops a video during playback. Precondition: The video is being played. Post condition: The file will stop and go back to the beginning of the file.
method playVideoFromPositionInPercent
- (void )playVideoFromPositionInPercent:(uint8_t)position
Header: DJIPlaybackManager.h
Description:
Plays a video from the specified location. The selected file must be a video file. Precondition: The camera must enter Single File Preview Mode. Post condition: The file will play from a specific location immediately. This command can only be called if the video is currently playing or is paused. If paused, the playback position will be updated and playing will resume.
uint8_t position 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.
method deleteCurrentPreviewFile
- (void )deleteCurrentPreviewFile
Header: DJIPlaybackManager.h
Description:
Deletes the current file being previewed. Precondition: The camera must enter single file preview mode. Post condition: The image will be deleted from the SD card.
Multi Preview Mode
method enterMultiplePreviewMode
- (void )enterMultiplePreviewMode
Header: DJIPlaybackManager.h
Description:
Enables the user to preview multiple files when the camera is in Playback mode. Precondition: The camera work mode should be set to Playback mode. Post condition: There will be 8 images on one page.
method goToNextMultiplePreviewPage
- (void )goToNextMultiplePreviewPage
Header: DJIPlaybackManager.h
Description:
Goes to the next page when there are multiple pages. Precondition: The camera must enter Multiple Preview Mode. Special case: If it is the last page, it will stay at the last page.
method goToPreviousMultiplePreviewPage
- (void )goToPreviousMultiplePreviewPage
Header: DJIPlaybackManager.h
Description:
Goes back to the previous page when there are multiple pages. Precondition: The camera must enter Multiple Preview Mode. Special case: If it is the first page, it will stay at the first page.
Multi Edit Mode
method enterMultipleEditMode
- (void )enterMultipleEditMode
Header: DJIPlaybackManager.h
Description:
This enables the user to select, download, or delete multiple media files when the camera is in Playback mode. Precondition: The camera work mode must be set to Camera Play back mode and then Multiple Preview Mode. Post condition: Multiple photos can be selected to be downloaded or deleted. @return DJICameraError Shows the possible error during the execution. If there is no error, it returns null
.
method exitMultipleEditMode
- (void )exitMultipleEditMode
Header: DJIPlaybackManager.h
Description:
Exits multiple edit mode.
method toggleFileSelectionAtIndex
- (void )toggleFileSelectionAtIndex:(int )index
Header: DJIPlaybackManager.h
Description:
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. Precondition: The camera must enter Multiple Edit Mode.
int index Index at which to select a file.
method selectAllFiles
Header: DJIPlaybackManager.h
Description:
Selects all the files on the SD card. Precondition: The camera must enter Multi Edit Mode.
method unselectAllFiles
Header: DJIPlaybackManager.h
Description:
Unselects all the files on the SD card. Precondition: The camera must enter Multiple Edit Mode.
method selectAllFilesInPage
- (void )selectAllFilesInPage
Header: DJIPlaybackManager.h
Description:
Selects all the file(s) on the current page. Precondition: The camera must enter Multiple Edit Mode.
method unselectAllFilesInPage
- (void )unselectAllFilesInPage
Header: DJIPlaybackManager.h
Description:
Unselects all the file(s) on the current page. Precondition: The camera must enter Multiple Edit Mode.
method deleteAllSelectedFiles
- (void )deleteAllSelectedFiles
Header: DJIPlaybackManager.h
Description:
Deletes all selected files from the SD card. Precondition: The camera must enter Multiple Edit Mode. Post condition: The images will be deleted from the SD card.
method downloadSelectedFilesWithPreparation:process:fileCompletion:overallCompletion
- (void )downloadSelectedFilesWithPreparation:(nullable DJIFileDownloadPreparingBlock)prepareBlock
process:(nullable DJIFileDownloadingBlock)dataBlock
fileCompletion:(nullable DJIFileDownloadCompletionBlock)fileCompletionBlock
overallCompletion:(nullable DJICompletionBlock)finishBlock
Header: DJIPlaybackManager.h
Description:
Downloads the currently selected media files. Precondition: The camera must enter multiple preview mode.
nullable DJIFileDownloadPreparingBlock prepareBlock Callback to prepare each file for download. nullable DJIFileDownloadingBlock dataBlock Callback while a file is downloading. The dataBlock can be called multiple times for a file. The error argument in <code>DJIFileDownloadingBlock</code> is not used and should be ignored. nullable DJIFileDownloadCompletionBlock fileCompletionBlock Callback after each file have been downloaded. nullable DJICompletionBlock finishBlock Callback after the downloading is finished.
method stopDownloadingFilesWithCompletion
- (void )stopDownloadingFilesWithCompletion:(nullable DJICompletionBlock)block
Header: DJIPlaybackManager.h
Description:
Cancel current file download.
protocol DJIPlaybackDelegate
@protocol DJIPlaybackDelegate <NSObject >
Header: DJIPlaybackManager.h Inherits From: NSObject
Description:
The protocol provides a delegate method to receive the updated state of the playback manager.
Protocol Methods:
Protocol Method
method playbackManager:didUpdatePlaybackState
@required
- (void )playbackManager:(DJIPlaybackManager *_Nonnull)playbackManager didUpdatePlaybackState:(DJICameraPlaybackState *_Nonnull)playbackState
Header: DJIPlaybackManager.h
Description:
Updates the playback state of the camera. This update method will only be called when the camera's work mode is set to DJICameraModePlayback
.
typedef block DJIFileDownloadPreparingBlock
typedef void (^_Nullable DJIFileDownloadPreparingBlock)(NSString *_Nullable fileName, DJIDownloadFileType fileType, NSUInteger fileSize, BOOL *skip)
Header: DJIPlaybackManager.h
Description:
Block invoked when preparing a file for download.
NSString *_Nullable fileName File name. DJIDownloadFileType fileType Type of file. NSUInteger fileSize Size of file. BOOL * skip Can be set to decide whether or not to skip the file.
typedef block DJIFileDownloadingBlock
typedef void (^_Nullable DJIFileDownloadingBlock)(NSData *_Nullable data, NSError *_Nullable error)
Header: DJIPlaybackManager.h
Description:
Block invoked when a file is downloading.
NSData *_Nullable data File data. NSError *_Nullable error Error experienced during transfer.
typedef block DJIFileDownloadCompletionBlock
typedef void (^_Nullable DJIFileDownloadCompletionBlock)()
Header: DJIPlaybackManager.h
Description:
Block invoked after a file has been downloaded.