# `SEO.OpenGraph.Video`
[🔗](https://github.com/dbernheisel/phoenix_seo/blob/0.2.1/lib/seo/open_graph/video.ex#L1)

Data describing a video.

Commonly, an `og:video` is accompanied with an `og:image` that provides the preview image for the video.

### Resources

- https://ogp.me/#structured
- https://developers.facebook.com/docs/sharing/webmasters/#video
- https://yandex.com/support/video/partners/open-graph.html

# `mime`

```elixir
@type mime() :: String.t() | nil
```

# `pixels`

```elixir
@type pixels() :: pos_integer() | nil
```

# `t`

```elixir
@type t() :: %SEO.OpenGraph.Video{
  alt: String.t() | nil,
  height: pixels(),
  secure_url: URI.t() | String.t() | nil,
  type: mime(),
  url: URI.t() | String.t(),
  width: pixels(),
  ya_allow_embed: boolean() | nil,
  ya_bitrate: yandex_bitrate(),
  ya_quality: yandex_quality()
}
```

# `yandex_bitrate`

```elixir
@type yandex_bitrate() :: pos_integer() | nil
```

# `yandex_quality`

```elixir
@type yandex_quality() :: :low | :medium | :hd | :full_hd | nil
```

# `build`

```elixir
@spec build(SEO.attrs(), SEO.config()) :: t() | nil
```

The `og:video` property has some optional structured properties:

- `:url` - The url with metadata that describes the video.
- `:secure_url` - An alternate url to use if the webpage requires HTTPS. If the URL starts with `https` then
- `:type` - A MIME type for this video. Facebook supports both mp4 and Flash videos, `application/x-shockwave-flash`
  or `video/mp4`, but please for the love of all that is holy don't use Shockwave Flash.
- `:width` - The width in pixels.
- `:height` - The height in pixels.
- `:alt` - A description of what is in the video (not a caption). If the page specifies an `og:video` it should
  specify `og:video:alt`.

Supply a secure URL for both the `og:video:url` and `og:video:secure_url` tags to make your video eligible to play
in-line in Facebook's Feed.

For Yandex, there are additional properties:

- `:ya_bitrate` - Maximum bitrate in kilobits per second
- `:ya_allow_embed` - Allow embedding in Yandex search results
- `:ya_quality` - The quality in resolution and bitrate
  - `:low` - Low quality with resolution less than 360x640 and bitrate lower than 717kbps
  - `:medium` - Average quality with resolution between 360x640 and 720x1280 and bitrate between than 717kbps-1Mbps
  - `:hd` - HD quality with resolution between 720x1280 and 1080x1920 and bitrate between than 1MBps-2Mbps
  - `:full_hd` - 1080p quality with resolution greater than 1080x1920 and bitrate higher than 2Mbps

# `meta`

## Attributes

* `content` (`:any`) - Defaults to `nil`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
