Interface MediaDownloadable.DownloadEventListener

  • Enclosing class:
    MediaDownloadable

    public static interface MediaDownloadable.DownloadEventListener
    Interface definition for a callback to be invoked when a media download is either completed, cancelled or failed because an error has occurred.
    • Method Detail

      • onDownloadRequested

        void onDownloadRequested​(@NonNull
                                 Video video)
        This method will be called when download request begins to process.
        Parameters:
        video - the video that has started.
      • onDownloadStarted

        void onDownloadStarted​(@NonNull
                               Video video,
                               long estimatedSize,
                               @NonNull
                               java.util.Map<java.lang.String,​java.io.Serializable> mediaProperties)
        This method will be called after successfully placing all required assets for the media in the download queue.
        Parameters:
        video - the video that was queued.
        estimatedSize - estimated total size of the download.
        mediaProperties - map of information related to the video being downloaded.
      • onDownloadProgress

        void onDownloadProgress​(@NonNull
                                Video video,
                                @NonNull
                                DownloadStatus status)
        This method will be called when the download request is currently running.
        Parameters:
        video - the video download that is being downloaded.
        status - the detailed status of the download.
      • onDownloadPaused

        void onDownloadPaused​(@NonNull
                              Video video,
                              @NonNull
                              DownloadStatus status)
        This method will be invoked when the requested of a media cannot be downloaded due to an error.
        Parameters:
        video - the video download that has been paused.
        status - the detailed status of the download.
      • onDownloadCompleted

        void onDownloadCompleted​(@NonNull
                                 Video video,
                                 @NonNull
                                 DownloadStatus status)
        This method will be invoked upon successful download of the requested media.
        Parameters:
        video - the video that was downloaded.
      • onDownloadCanceled

        void onDownloadCanceled​(@NonNull
                                Video video)
        This method will be invoked when the download request of a media has been cancelled.
        Parameters:
        video - the video that was cancelled.
      • onDownloadDeleted

        void onDownloadDeleted​(@NonNull
                               Video video)
        This method will be invoked when the fully downloaded copy of a media was deleted.
        Parameters:
        video - the video that was deleted.
      • onDownloadFailed

        void onDownloadFailed​(@NonNull
                              Video video,
                              @NonNull
                              DownloadStatus status)
        This method will be invoked when the requested of a media cannot be downloaded due to an error.
        Parameters:
        video - the video that failed.
        status - the detailed status of the download.