Package com.vonage.client.video
Class Archive
java.lang.Object
com.vonage.client.JsonableBaseObject
com.vonage.client.video.StreamComposition
com.vonage.client.video.Archive
- All Implemented Interfaces:
Jsonable
Represents an archive of a video session.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUsed to construct an Archive object. -
Field Summary
Fields inherited from class com.vonage.client.video.StreamComposition
applicationId, createdAt, hasAudio, hasVideo, id, layout, maxBitrate, resolution, sessionId, streamMode, streams -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Archive.BuilderInstantiates a Builder, used to construct this object.static ArchiveCreates an instance of this class from a JSON payload.The duration of the recording (precision in seconds).The duration of the recording, in seconds.Returns the multiArchiveTag if set for the Archive.getName()The name of the archive.The output mode to be generated for this archive:composedorindividual.For archives withArchiveStatus.STOPPEDorArchiveStatus.FAILED, this string describes the reason the archive stopped (such as "maximum duration exceeded") or failed.getSize()The size of the MP4 file.The status of the archive, as defined by theArchiveStatusenum.getUrl()The download URL of the available MP4 file.Methods inherited from class com.vonage.client.video.StreamComposition
getApplicationId, getCreatedAt, getCreatedAtMillis, getId, getLayout, getMaxBitrate, getResolution, getSessionId, getStreamMode, getStreams, hasAudio, hasVideoMethods inherited from class com.vonage.client.JsonableBaseObject
createJsonObjectMapper, equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.vonage.client.Jsonable
toJson, updateFromJson
-
Constructor Details
-
Archive
protected Archive() -
Archive
-
-
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
The name of the archive.- Returns:
- The archive name.
-
getReason
For archives withArchiveStatus.STOPPEDorArchiveStatus.FAILED, this string describes the reason the archive stopped (such as "maximum duration exceeded") or failed.- Returns:
- The failure reason text, or
nullif not applicable.
-
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
nullif unset.
-
getStatus
The status of the archive, as defined by theArchiveStatusenum.- Returns:
- The status.
-
getUrl
The download URL of the available MP4 file. This is only set for an archive with the status set toArchiveStatus.AVAILABLE; for other archives (including those with the status ofArchiveStatus.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 theVideoClient.listArchives()orVideoClient.getArchive(String)method.- Returns:
- The download URL.
-
getOutputMode
The output mode to be generated for this archive:composedorindividual.- Returns:
- The OutputMode.
-
getMultiArchiveTag
Returns the multiArchiveTag if set for the Archive.- Returns:
- The multiArchiveTag, or
nullif not applicable.
-
fromJson
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
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.
-