Player Metadata from bcinfo

In this topic you will learn how to retrieve information about the player (metadata) from the bcinfo object.

Object overview

Here are specific instances of console.log() and a console.table() views of the data contained in the bcinfo property.

bcinfo console log
bcinfo console table

You can access this information using code similar to the following:

videojs.getPlayer('myPlayerID').ready(function() {
  var myPlayer = this;
  console.log('myPlayer.bcinfo', myPlayer.bcinfo);

Object properties

The bcinfo property is an object which contains information (metadata) on the current player. The properties present in the object are as follows:

Field Name Description Data Type
accountId Brightcove account identifier string
applicationId Value you can set for use with analytics. It is defined as an attribute of the player:
<video-js id="myPlayerID"
css Reflects CSS values set in Studio, in the PLAYERS > STYLING section:
Studio Player Styles
embedId If the player is an embed (child player), this value reflects the ID of the parent. string
playerId Identifier for the player string
scriptBaseUrl The base URL for the location of the player's unique configuration file. The actual file name, index.min.js is NOT included. string
scriptUrl Location of the player's unique configuration file named index.min.js. string