View Source SEO.OpenGraph.Video (SEO v0.1.11)

Data describing a video.

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

Resources

Summary

Functions

The og:video property has some optional structured properties

Attributes

  • content (:any) - Defaults to nil.

Types

mime()

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

pixels()

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

t()

@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()

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

yandex_quality()

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

Functions

build(attrs, default \\ nil)

@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(assigns)

Attributes

  • content (:any) - Defaults to nil.