Resource: DvrSession
DvrSession is a sub-resource under channel. Each DvrSession represents a DVR recording of the live stream for a specific time range.
JSON representation |
---|
{ "name" : string , "createTime" : string , "updateTime" : string , "labels" : { string : string , ... } , "state" : enum ( |
name
string
Identifier. The resource name of the DVR session, in the following format: projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}
. {dvrSessionId}
is a user-specified resource id that conforms to the following criteria:
- 1 character minimum, 63 characters maximum
- Only contains letters, digits, underscores, and hyphens
createTime
string (
Timestamp
format)
Output only. The creation time.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
updateTime
string (
Timestamp
format)
Output only. The update time.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
labels
map (key: string, value: string)
Optional. User-defined key/value metadata.
An object containing a list of "key": value
pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
state
enum (
State
)
Output only. The state of the clip.
error
object (
Status
)
Output only. An error object that describes the reason for the failure. This property only presents when state
is FAILED
.
dvrManifests[]
object (
DvrManifest
)
Required. A list of DVR manifests. Currently only one DVR manifest is allowed.
dvrWindows[]
object (
DvrWindow
)
Required. The specified ranges of segments to generate a DVR recording.
State
State of the DVR session.
Enums | |
---|---|
STATE_UNSPECIFIED
|
State is not specified. |
PENDING
|
The operation is pending to be picked up by the server. |
UPDATING
|
The session is being updated. |
SCHEDULED
|
The session is scheduled and waiting for the start time. |
LIVE
|
The session is currently in progress and the outputs are available in the specified Cloud Storage bucket. For additional information, see the dvrManifests.output_uri
field. |
FINISHED
|
Outputs are available in the specified Cloud Storage bucket. For additional information, see the dvrManifests.output_uri
field. |
FAILED
|
The operation has failed. For additional information, see the error
field. |
DELETING
|
The session is being deleted. |
POST_PROCESSING
|
The session is being post processed. |
COOLDOWN
|
The session is in cooldown. The cooldown period lasts for 60 seconds. When the DVR session is updated by the user to have a new end time that is likely already in the past, the DVR manifest will end as soon as possible and the DVR session will move to this state. This is done to prevent the players to receive a manifest update that removes a segment that has already been played. After the cooldown period ends, a new manifest is generated that honors the new end time. |
STOPPING
|
The session is being stopped. The session will move to STOPPING state, if the parent channel is updated. |
DvrManifest
DvrManifest identifies a source manifest and specifies a file name for the generated DVR manifest.
JSON representation |
---|
{ "manifestKey" : string , "outputUri" : string } |
Fields | |
---|---|
manifestKey
|
Required. A unique key that identifies a manifest config in the parent channel. This key is the same as |
outputUri
|
Output only. The output URI of the DVR manifest. The DVR output will be placed in a directory named |
DvrWindow
DvrWindow represents a DVR window.
JSON representation |
---|
{ // Union field |
kind
. The allowlist forms of a DVR window. kind
can be only one of the following:timeInterval
object (
TimeInterval
)
A time interval in the form of a tuple of Unix epoch time.
TimeInterval
TimeInterval represents a time interval.
JSON representation |
---|
{ "startTime" : string , "endTime" : string } |
Fields | |
---|---|
startTime
|
Optional. The start time of the interval. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTime
|
Optional. The end time of the interval. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
Methods |
|
---|---|
|
Creates a DVR session with the provided unique ID in the specified channel. |
|
Deletes the specified DVR session. |
|
Returns the specified DVR session. |
|
Returns a list of all DVR sessions in the specified channel. |
|
Updates the specified DVR session. |