Interface CameraController.RecordingListener

Enclosing interface:
CameraController

public static interface CameraController.RecordingListener
This class can be used to listen for recording events.
  • Method Details

    • onRecordingStarted

      void onRecordingStarted(androidx.documentfile.provider.DocumentFile outputFile)
      This callback is called as soon as a new recording session has begun streaming video to disk.

      You can use this callback to update your user interface (such as change the recording button to a stop button).

      This event will be called for each video fragment.

      Parameters:
      outputFile - The file where the video is saved.
    • onRecordingFragmentStopped

      void onRecordingFragmentStopped(CameraController.RecordingStopReason reason, @Nullable String libraryItemId)
      This callback is called after current video fragment's data was completely flushed to disk.
      Parameters:
      reason - The reason for stopping.
      libraryItemId - The identifier of the library item created for the recording.
    • onRecordingStopped

      void onRecordingStopped(CameraController.RecordingStopReason reason)
      This callback is called after a recording session completely stopped recording and all data was flushed to disk.

      Use this event to update your user interface (such as change the record stop button back to a record button).

      Parameters:
      reason - The reason for stopping.