Interface Recorder


public interface Recorder
Object used to record the audio or video of a call.

  • Method Details

    • getCaptureVolume

      float getCaptureVolume()
      Get linear volume when capturing audio.

      Returns:
      Linear volume.
    • getDuration

      int getDuration()
      Gets the duration of the recording.

      Returns:
      the duration of the recording, in milliseconds.
    • getFile

      @Nullable String getFile()
      Gets the file used for recording.

      Returns:
      the file used for the recording if any.
    • getParams

      @NonNull RecorderParams getParams()
      Retrieve the RecorderParams object.

      Returns:
      The RecorderParams object.
    • setParams

      void setParams(@NonNull RecorderParams params)
      Set the RecorderParams object.

      Parameters:
      params - The RecorderParams object to set.
    • getState

      Recorder.State getState()
      Gets the current state of the recorder.

      Returns:
      the current Recorder.State.
    • close

      void close()
      Close the opened file.

    • createContent

      @Nullable Content createContent()
      Create a content from the recording, for example to send it in a chat message.

      warning: Recorder must be in Closed state!
      Returns:
      the Content matching the recording, or null.
    • open

      int open(@NonNull String file)
      Open a file for recording.

      Parameters:
      file - The path to the file to open.
    • pause

      int pause()
      Pause the recording.

    • start

      int start()
      Start the recording into the opened file.

    • setUserData

      void setUserData(Object data)
      Sets the object to store in this object user's data
      Parameters:
      data - the object to store
    • getUserData

      Object getUserData()
      Gets the object stored in this object user's data
      Returns:
      the object store if any, null otherwise
    • getNativePointer

      long getNativePointer()
      Gets the native pointer used by this class to make native method calls.
      Returns:
      the nativer pointer, as long
    • toString

      String toString()
      Overrides:
      toString in class Object