Class Archive

All Implemented Interfaces:
Jsonable

public class Archive extends StreamComposition
Represents an archive of a video session.
  • Constructor Details

  • Method Details

    • getDurationSeconds

      The duration of the recording, in seconds.
      Returns:
      The duration as an integer.
    • getDuration

      The duration of the recording (precision in seconds).
      Returns:
      The duration.
    • getName

      public String getName()
      The name of the archive.
      Returns:
      The archive name.
    • getReason

      public String getReason()
      For archives with ArchiveStatus.STOPPED or ArchiveStatus.FAILED, this string describes the reason the archive stopped (such as "maximum duration exceeded") or failed.
      Returns:
      The failure reason text, or null if not applicable.
    • getSize

      public Long getSize()
      The size of the MP4 file. For archives that have not been generated, this value is set to 0.
      Returns:
      The size as a long, or null if unset.
    • getStatus

      The status of the archive, as defined by the ArchiveStatus enum.
      Returns:
      The status.
    • getUrl

      public URI getUrl()
      The download URL of the available MP4 file. This is only set for an archive with the status set to ArchiveStatus.AVAILABLE; for other archives (including those with the status of ArchiveStatus.UPLOADED) this method returns null. The download URL is obfuscated, and the file is only available from the URL for 10 minutes. To generate a new URL, call the VideoClient.listArchives() or VideoClient.getArchive(String) method.
      Returns:
      The download URL.
    • getOutputMode

      The output mode to be generated for this archive: composed or individual.
      Returns:
      The OutputMode.
    • getMultiArchiveTag

      Returns the multiArchiveTag if set for the Archive.
      Returns:
      The multiArchiveTag, or null if not applicable.
    • fromJson

      public static Archive fromJson(String json)
      Creates an instance of this class from a JSON payload.
      Parameters:
      json - The JSON string to parse.
      Returns:
      An instance of this class with the fields populated, if present.
    • builder

      public static Archive.Builder builder(String sessionId)
      Instantiates a Builder, used to construct this object.
      Parameters:
      sessionId - The ID of the Vonage Video session you are working with.
      Returns:
      A new Archive.Builder.