Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including videojs-schema with all npm packages installed. Try it out:

var videojsSchema = require("videojs-schema")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

videojs-schema v0.4.0

Injects JSON-LD metadata into the DOM for SEO

**Table of Contents** *generated with [DocToc](*


A plugin for the Brightcove Player to inject metadata from a Video Cloud video in to the page as structured data. It uses the JSON-LD format supported by Google for video SEO, e.g.

<script type="application/ld+json">
  "name":"Big Buck Bunny",
  "description":"(c) copyright 2008, Blender Foundation /",

As seen by Google:

The embedUrl is only included if the social plugin is present and its removeEmbed option is not true.


schemaId - the value to use as @id in the metadata. This must be a unique URI which represents the video, but not necessarily a "real" URL. This is arbitrary and might be a value like{id} or{id} or{id}#the-video.

Accepts {id}, {referenceId}, {playerId}, {embedId} and {accountId} as macros.

Defaults to{accountId}/{playerId}_{embedId}/index.html?videoId={id}

keywords - if true, include tags as keywords. Default is false.

excludeTags - array of tags to not include as keywords, e.g. ["youtubesync"]

baseObject - an option object of properties onto which to build the video specific metadata. For example this could be used to include a publisher object:

includeEmbedUrl - if false, no embed url is included. Inlcuding thisURL may be expected by search engines. Default is true.

"baseObject": {
  "publisher": {
    "@type": "Organization",
    "name": "Publisher name",
    "logo": {
      "@type": "ImageObject",
      "url": "",
      "width": 600,
      "height": 60

preferLongDescription - if true, use the long description if available. If false, or true and long description is not set then the (short) description field will be used. Default is false.


Add as a plugin to a player in Video Cloud Studio:

  • Under "plugins" click "add a plugin", 'custom plugin"
  • Plugin name is schema
  • Javascript URL is
  • No CSS
  • Leave blank unless using options above, in which case
  "schemaId": "{id}"
  • Save, then publish


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free