REST Resource: projects.locations.channels.dvrSessions

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 (State),
  "error": {
    object (Status)
  },
  "dvrManifests": [
    {
      object (DvrManifest)
    }
  ],
  "dvrWindows": [
    {
      object (DvrWindow)
    }
  ]
}
Fields
name

string

Identifier. The resource name of the DVR session, in the following format: projects/{project}/locations/{location}/channels/{c}/dvrSessions/{dvrSession}. {dvrSessionId} is a user-specified resource id that conforms to the following criteria:

  1. 1 character minimum, 63 characters maximum
  2. Only contains letters, digits, underscores, and hyphens
createTime

string (Timestamp format)

Output only. The creation time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The update time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

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

string

Required. A unique key that identifies a manifest config in the parent channel. This key is the same as channel.manifests.key for the selected manifest.

outputUri

string

Output only. The output URI of the DVR manifest. The DVR output will be placed in a directory named dvr/dvrSessionId/ under the parent channel's output uri. Format: {channel.output.uri}/dvr/{dvrSessionId}/{channel.manifests.fileName} Example: gs://my-bucket/outputs/dvr/my-dvr-session/main.m3u8

DvrWindow

DvrWindow represents a DVR window.

JSON representation
{

  // Union field kind can be only one of the following:
  "timeInterval": {
    object (TimeInterval)
  }
  // End of list of possible types for union field kind.
}
Fields
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

string (Timestamp format)

Optional. The start time of the interval.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

endTime

string (Timestamp format)

Optional. The end time of the interval.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Methods

create

Creates a DVR session with the provided unique ID in the specified channel.

delete

Deletes the specified DVR session.

get

Returns the specified DVR session.

list

Returns a list of all DVR sessions in the specified channel.

patch

Updates the specified DVR session.