Video SEO Schema Generator Plugin
Introduction
The plugin detailed in this document adds SEO metadata for the video in your Brightcove Player. An example result that Google would see for a video is shown here:

You can learn more about validating your structured data later in the document in the Google's Structured Data Testing Tool section.
Installing the plugin
This plugin installs just as any custom plugin would. Following are instructions to add the plugin using Studio and in code.
Installing using the PLAYERS module
- Open the PLAYERS module and either create a new player or locate the player to which you wish to add the plugin.
- Click the link for the player to open the player's properties.
- Click Plugins in the left navigation menu.
- Next click Plugins from the three options.
- From the Add a Plugin select Custom Plugin.
- For the Plugin Name enter
schema
. - For the JavaScript URL, enter:
https://cdn.jsdelivr.net/npm/videojs-schema/dist/videojs-schema.min.js
- No CSS URL is needed.
- You do not have to enter any options for this plugin in this specific implementation.
- Click Save.
- To publish the player, click Publish & Embed > Publish Changes.
- To close the open dialog, click Close.
Installing using code
If you wish to install the plugin for single player using code, use the following code as a guide:
<video id="myPlayerID"
data-video-id="5796745147001"
data-account="1507807800001"
data-player="default"
data-embed="default"
data-application-id
class="video-js"
controls
width="640"
height="360"></video>
<script src="//players.brightcove.net/1507807800001/default_default/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/videojs-schema/dist/videojs-schema.min.js"></script>
<script>
videojs.getPlayer('myPlayerID').ready(function() {
var myPlayer = this;
myPlayer.schema();
});
</script>
Google's Rich Results Test Tool
Once the plugin in installed, and you publish a video in a Brightcove Player you can test to be sure the structured data is correct. Google provide a Rich Results Tool. On that page you are prompted to enter the URL for the page containing your player and choose to test based on a desktop or smartphone client:

After you enter the URL to your page and click TEST URL, any errors in your data will be displayed.

The results show you whether the pages passes, but also offers additional valuable information. For example, click on the video title to expand the video information:

Schema used
This plugin is used to inject metadata from a Video Cloud video in to the page as Schema.org structured data. It uses the JSON-LD format supported by Google for video SEO:
<script type="application/ld+json">
{
"@context":"http://schema.org/",
"@type":"VideoObject",
"name":"Big Buck Bunny",
"description":"(c) copyright 2008, Blender Foundation / www.bigbuckbunny.org",
"thumbnailUrl":"https://cf-images.eu-west-1.prod.boltdns.net/v1/static/906043040001/f7d56300-ffca-460d-8ff6-fef835c12b36/e284fdba-d15a-422f-bebc-6a355e3d4dd3/1280x720/match/image.jpg",
"uploadDate":"2016-10-20",
"@id":"http://players.brightcove.net/906043040001/5WnZb7ptr_default/index.html?videoId=ref:bunnyfull",
"duration":"PT10M35S",
"embedUrl":"http://players.brightcove.net/906043040001/5WnZb7ptr_default/index.html?videoId=1401169490001"
}
</script>
Plugin options
There are six options you can use with this plugin:
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 values like:- https://mydomain.com/videos/{id}
- https://videos.mydomain.com#{id}
- https://mydomain.com/article-about-video-{id}#the-video
The following are accepted as macros:
- {id}
- {referenceId}
- {playerId}
- {embedId}
- {accountId}
The default URI will be:
https://players.brightcove.net/{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:"baseObject": { "publisher": { "@type": "Organization", "name": "Publisher name", "logo": { "@type": "ImageObject", "url": "https://example.com/logo.jpg", "width": 600, "height": 60 } } }
includeEmbedUrl
: If false, no embed url is included. Including this URL may be expected by search engines. Default is true.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.