# place.stream.media.getVideo

> Published by [did:web:stream.place](https://lexicon.garden/identity/did:web:stream.place)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.media.getVideo)
- [Documentation](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.media.getVideo/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.media.getVideo/examples)

## Definitions

### `place.stream.media.getVideo`

**Type**: `query`

Get a hydrated view of a place.stream.video record — the record itself plus author info plus aggregated view counts summed across every reporting node we've indexed. View counts come from place.stream.media.viewCount records; consumers see one number per metric, with the underlying multi-reporter detail collapsed away.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | AT-URI of the place.stream.video record. |

#### Output

**Encoding**: `application/json`

#### Errors

- **VideoNotFound**: No record indexed at the supplied AT-URI.

### `place.stream.media.getVideo#videoView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `author` | `ref` → `app.bsky.actor.defs#profileViewBasic` | Yes |  |
| `record` | `unknown` | Yes |  |
| `tracks` | `array` | No |  |
| `likeCount` | `integer` | Yes | Total number of place.stream.like records whose subject is this video. Always present; zero when none, so consumers can render a count unconditionally. |
| `viewCounts` | `ref` → `#viewCountSummary` | Yes | Aggregated view counts across every indexed reporter. Always present; zero-valued (count=0, reporters=0) when no place.stream.media.viewCount records have been observed yet, so consumers can render a count unconditionally. |

### `place.stream.media.getVideo#viewCountSummary`

**Type**: `object`

Sums across every place.stream.media.viewCount record indexed for this video, regardless of reporter or window. The underlying records are window-bounded; the consumer sees a running total.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bytes` | `integer` | Yes | Sum of bytes transferred across every track row in every indexed report. |
| `count` | `integer` | Yes | Sum of `count` across every indexed report. |
| `reporters` | `integer` | Yes | Number of distinct streamplace nodes that have contributed at least one viewCount record for this video. |
| `durationMs` | `integer` | Yes | Sum of playback duration (ms) across every track row in every indexed report. |

## Raw Schema

```json
{
  "id": "place.stream.media.getVideo",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "VideoNotFound",
          "description": "No record indexed at the supplied AT-URI."
        }
      ],
      "output": {
        "schema": {
          "ref": "#videoView",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "uri"
        ],
        "properties": {
          "uri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the place.stream.video record."
          }
        }
      },
      "description": "Get a hydrated view of a place.stream.video record — the record itself plus author info plus aggregated view counts summed across every reporting node we've indexed. View counts come from place.stream.media.viewCount records; consumers see one number per metric, with the underlying multi-reporter detail collapsed away."
    },
    "videoView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "author",
        "record",
        "viewCounts",
        "likeCount"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "author": {
          "ref": "app.bsky.actor.defs#profileViewBasic",
          "type": "ref"
        },
        "record": {
          "type": "unknown"
        },
        "tracks": {
          "type": "array",
          "items": {
            "ref": "place.stream.media.track#trackView",
            "type": "ref"
          }
        },
        "likeCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Total number of place.stream.like records whose subject is this video. Always present; zero when none, so consumers can render a count unconditionally."
        },
        "viewCounts": {
          "ref": "#viewCountSummary",
          "type": "ref",
          "description": "Aggregated view counts across every indexed reporter. Always present; zero-valued (count=0, reporters=0) when no place.stream.media.viewCount records have been observed yet, so consumers can render a count unconditionally."
        }
      }
    },
    "viewCountSummary": {
      "type": "object",
      "required": [
        "count",
        "bytes",
        "durationMs",
        "reporters"
      ],
      "properties": {
        "bytes": {
          "type": "integer",
          "minimum": 0,
          "description": "Sum of bytes transferred across every track row in every indexed report."
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "description": "Sum of `count` across every indexed report."
        },
        "reporters": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of distinct streamplace nodes that have contributed at least one viewCount record for this video."
        },
        "durationMs": {
          "type": "integer",
          "minimum": 0,
          "description": "Sum of playback duration (ms) across every track row in every indexed report."
        }
      },
      "description": "Sums across every place.stream.media.viewCount record indexed for this video, regardless of reporter or window. The underlying records are window-bounded; the consumer sees a running total."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
