DJI Mobile SDK Documentation

      class FetchMediaTask

      class FetchMediaTask
      Package:dji.sdk.media
      Description:

      Task to fetch contents of a media file. To make FetchMediaTaskScheduler fetch the thumbnail, preview or custom information of a media file, a task should be created by using FetchMediaTask.

      Class Members:
      method FetchMediaTask
      FetchMediaTask(MediaFile file, FetchMediaTaskContent content, Callback callback)
      Package:dji.sdk.media
      Description:

      Creates a task instance.

      Input Parameters:
      MediaFile fileMedia file to execute task on.
      FetchMediaTaskContent contentContent to fetch.
      Callback callbackThe completion callback with the returned execution result.
      method FetchMediaTask
      FetchMediaTask(MediaFile file, FetchMediaTaskContent content)
      Package:dji.sdk.media
      Description:

      Creates a task instance without callback.

      Input Parameters:
      MediaFile fileMedia file to execute task on.
      FetchMediaTaskContent contentContent to fetch.
      State Updates
      interface
      interface Callback
      interface Callback
      Package:dji.sdk.media
      Description:

      Callback that is called when the scheduler finishes downloading content for a fetch media file task. If multiple content types are defined for a file, this completion block will be called at the completion of each content type being downloaded. The order content types will be downloaded in is first THUMBNAIL, then PREVIEW.

      Interface Methods:

      Callback Method

      State
      method
      method onUpdate
      void onUpdate(MediaFile file, FetchMediaTaskContent option, DJIError error)
      Package:dji.sdk.media
      Description:

      Called each time the scheduler finishes downloading content.

      Input Parameters:
      MediaFile filefile to execute task on.
      FetchMediaTaskContent optionAn enum value of FetchMediaTaskContent.
      DJIError errorError retrieving the value.
      enum FetchMediaTaskContent
      enum FetchMediaTaskContent
      Package:dji.sdk.media
      Description:

      The content to download in a fetch media file task.

      Enum Members:
      NONENone.
      THUMBNAILThe scheduler will download the thumbnail of the media file.
      PREVIEWThe scheduler will download the preview image of the media file.
      CUSTOM_INFORMATIONThe scheduler will download the custom information of the media file.
      Class Members: