public class

DJIPlaybackManager

extends Object
java.lang.Object
   ↳ dji.sdk.Camera.DJIPlaybackManager

Class Overview

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

Summary

Nested Classes
interface DJIPlaybackManager.CameraFileDownloadCallback This callback will notify the process of downloading selected files. 
interface DJIPlaybackManager.DJICameraPlayBackStateCallBack The interface provides the method to receive the updated state of the playback manager. 
class DJIPlaybackManager.DJICameraPlaybackState This class provides general information and current status of Camera Playback State. 
Fields
public static DJIPlaybackManager.DJICameraPlaybackState djiCameraPlaybackState
Public Methods
DJICameraError deleteAllSelectedFiles()
Deletes all selected files from the SD card.
DJICameraError deleteCurrentPreviewFile()
Deletes the current file being previewed.
void downloadCurrentPreviewFile(File destDir, DJIPlaybackManager.CameraFileDownloadCallback callback)
Downloads the currently selected previewing media file.
void downloadSelectedFiles(File destDir, DJIPlaybackManager.CameraFileDownloadCallback callback)
Downloads the currently selected media files.
DJICameraError enterMultipleEditMode()
This enables the user to select, download and/or delete multiple media files when the camera is in Playback mode.
DJICameraError enterMultiplePreviewMode()
Enables the user to preview multiple files when the camera is in Playback mode.
DJIError enterSinglePreviewModeWithIndex(int index)
Enters Single File Preview Mode for a file at the specified index.
DJICameraError exitMultipleEditMode()
Exits multiple edit mode.
DJICameraError multiplePreviewNextPage()
Goes to the next page when there are multiple pages.
DJICameraError multiplePreviewPreviousPage()
Goes back to the previous page when there are multiple pages.
DJICameraError pauseVideoPlayback()
Pauses a video during playback.
DJICameraError selectAllFiles()
Selects all the files on the SD card.
DJICameraError selectAllFilesInPage()
Selects all the file(s) on the current page.
void setDJICameraPlayBackStateCallBack(DJIPlaybackManager.DJICameraPlayBackStateCallBack cameraPlayBackStateCB)
Sets the camera's playback state callback.
DJICameraError setVideoPlaybackFastBackward()
Quickly rewinds the video.
DJICameraError setVideoPlaybackFastForward()
Speeds up the selected video.
DJIError setVideoPlaybackFromLocation(Byte location)
Plays a video from a specific location.
DJICameraError singlePreviewNextPage()
Goes to the next file.
DJICameraError singlePreviewPreviousPage()
Goes back to the previous file.
DJICameraError startVideoPlayback()
Starts video playback.
DJICameraError stopVideoPlayback()
Stops a video during playback.
DJIError toggleFileSelectionAtIndex(int index)
Selects or unselects a file at the specified index of the current page.
DJICameraError unselectAllFiles()
Unselects all the files on the SD card.
DJICameraError unselectAllFilesInPage()
Unselects all the file(s) on the current page.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static DJIPlaybackManager.DJICameraPlaybackState djiCameraPlaybackState

Public Methods

public DJICameraError deleteAllSelectedFiles ()

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.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError deleteCurrentPreviewFile ()

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.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public void downloadCurrentPreviewFile (File destDir, DJIPlaybackManager.CameraFileDownloadCallback callback)

Downloads the currently selected previewing media file.

Parameters
destDir The directory for storing the download file
callback The execution callback. It requires the developer to implement four methods:

onStart() called as the file is about to start downloading.
onEnd() called when the file has completed downloading.
onError() called when there is an error during download.
onProgressUpdate() called to update the progress on downloading the file in percent. Range is [0, 100].
Returns
  • void

public void downloadSelectedFiles (File destDir, DJIPlaybackManager.CameraFileDownloadCallback callback)

Downloads the currently selected media files.

Precondition:
The camera must enter multiple preview mode.

Parameters
destDir The destination file directory, e.g., SDCardPath/folder/
callback The execution callback. It requires the developer to implement four methods:

onStart() called as a file is about to start downloading.
onEnd() called when all the selected files have completed downloading.
onError() called when there is an error during download.
onProgressUpdate() called to update the progress on downloading a file in percent. Range is [0, 100].
Returns
  • void

public DJICameraError enterMultipleEditMode ()

This enables the user to select, download and/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.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError enterMultiplePreviewMode ()

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.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJIError enterSinglePreviewModeWithIndex (int index)

Enters Single File Preview Mode for a file at the specified index.

Parameters
index File to be previewed at a specific index. The value falls in [1,8].
Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError exitMultipleEditMode ()

Exits multiple edit mode.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError multiplePreviewNextPage ()

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.

Returns
  • DJICameraErrorr Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError multiplePreviewPreviousPage ()

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.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError pauseVideoPlayback ()

Pauses a video during playback.

Precondition:
The video is being played.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError selectAllFiles ()

Selects all the files on the SD card.

Precondition:
The camera must enter Multi Edit Mode.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError selectAllFilesInPage ()

Selects all the file(s) on the current page.

Precondition:
The camera must enter Multiple Edit Mode.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public void setDJICameraPlayBackStateCallBack (DJIPlaybackManager.DJICameraPlayBackStateCallBack cameraPlayBackStateCB)

Sets the camera's playback state callback. Called according to the camera's update timer.

Precondition:
You must first define a DJICameraPlayBackStateCallBack object to pass in as a parameter.

Post Condition:
Every time the playback state changes, the DJICameraPlayBackStateCallback interface that was passed in as a parameter will call its onResult function.
The onResult function takes in a DJICameraPlayBackState object, which provides playback information such as the number of photos currently selected, the video playback progress (if a video is being played), and much more.

Parameters
cameraPlayBackStateCB The DJICameraPlayBackStateCallBack object to set as the callback interface for when the playback state changes.
The DJICameraPlayBackStateCallback interface implements an onResult function, which takes in a DJICameraPlayBackState object from the aircraft.
Returns
  • void
See Also
  • DJICameraPlayBackState

public DJICameraError setVideoPlaybackFastBackward ()

Quickly rewinds the video.

Precondition:
The video is being played.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError setVideoPlaybackFastForward ()

Speeds up the selected video.

Precondition:
The video is being played.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJIError setVideoPlaybackFromLocation (Byte location)

Plays a video from a specific 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.

Parameters
location The jump location [0 , 100]
Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError singlePreviewNextPage ()

Goes to the next file.

Precondition:
The camera must enter Single File Preview Mode.

Special case:
If it is the last image, it will go to the first image.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError singlePreviewPreviousPage ()

Goes back to the previous file.

Precondition:
The camera must enter Single File Preview Mode.

Special case:
If it is the first image, it will go to the last image.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError startVideoPlayback ()

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.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError stopVideoPlayback ()

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.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJIError toggleFileSelectionAtIndex (int index)

Selects or unselects a file at the specified index of the current page. This index is unrelated to filename, and used in multiple edit mode.

Precondition:
The camera must enter Multiple Edit Mode.

Parameters
index Index at which to select a file. The value falls in [1,8]. However, the exact range should depends on how many photos totally in current page.
Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError unselectAllFiles ()

Unselects all the files on the SD card.
Precondition:
The camera must enter Multiple Edit Mode.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.

public DJICameraError unselectAllFilesInPage ()

Unselects all the file(s) on the current page.

Precondition:
The camera must enter Multiple Edit Mode.

Returns
  • DJICameraError Shows the possible error during the execution. If there is no error, it returns null.