Player Metadata from bcinfo

Product(s)
Brightcove Player
Role(s)
Player Developer
Topic(s)
Player API References
Type
Support Doc

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);
  console.table(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"
  data-video-id="5622718636001"
  data-account="1507807800001"
  data-player="ryw1oAQ4M"
  data-embed="default"
  data-application-id="id_for_testing_bcinfo"
  class="video-js"
 ...
string
css Reflects CSS values set in Studio, in the PLAYERS > STYLING section:
Studio Player Styles
Object
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