Editing the Brightcove Player Publishing Code

Each Player takes different parameters, most of which you can modify, either by hand in your web page or by passing them into JavaScript at runtime. (View sample player publishing code)

You may want to edit the code, for example, if you want to use the same Player in multiple places with different content or if you want to reference content at runtime, via values pulled from an asset management or other storage mechanism (Integrating Players with a Web CMS)

Editable attributes generated by Brightcove Player

Attribute Description Where you find it in the Brightcove Console/Other info
videoId The default Title loaded into the Player, whether for a player with a single Lineup or if the Title is in the default Lineup. On the Titles page, the videoId is the number:
  • In the TITLE ID field in the Title Details area on the right (for a Title you have selected).
  • In the ID column of the All Titles area on the left. (Depending on the width of your computer display, you may need to adjust the column width to view the complete 8-digit ID. To adjust column width: Place your cursor on the line that separates the column headings and move as needed).
videoRef The default video loaded into the player by the refid specified in corresponding title. Can be any combination of characters up to a maximum of 150.

Passing a videoRef value takes precedence over a passed videoId. You can create a videoRef in the Reference ID of the Description page during the Title creation or editing process.
You can create a videoRef in the Reference ID field of the Description page during the Title creation or editing process.

This value is useful if you want to use a naming scheme for your Titles that ties into a customized asset-naming mechanism, as opposed to using the Brightcove-generated IDs.

videoRef is used for reporting. It allows you to use the same player instance, but by giving it a separate videoRef you can get individual statistics.
lineupId The default Lineup loaded into the Player.

The lineupId takes precedence over other passed values and will always be selected first. If an additional videoRef or videoId is passed into the Player as well, this will only be considered valid if the Title exists within the default lineup.
On the Lineups page, the lineupId is the number:

  • In the ID field of the Lineup Details area on the right (for a Lineup you have selected).
  • In the ID column of the Current Lineups area on the left. (Depending on the width of your computer display, you may need to adjust the column width to view the complete 8-digit ID. To adjust column width: Place your cursor on the line that separates the column headings and move as needed).
playerTag A publisher-generated value for identifying this Player in all Brightcove reports. You create a playerTag simply by entering a value into this field. The value can be any combination of alphanumeric characters to a maximum of 150 characters.
autoStart A Boolean value instructing the Player to automatically begin Playback of the first Title.

By default, this value is set to "false".
You set this value by changing the value to true in this script block.

In the Brightcove Console: This attribute corresponds to the "Play first video automatically" option available from Players > Settings.
continuousPlay A Boolean value instructing the Player whether or not Titles will be looped automatically.

When continousPlay is set to true:
  • For a single Lineup:
    Each title will playback in a loop until that Lineup is finished. For a Player with Thumb Navigation, continousPlay will loop the Lineup currently being viewed

  • For multiple Lineups:
    The Player proceeds through one Lineup and on to the next. For a Player with Tab Navigation, continuous Play will play through all available lineups.
The continuousPlay attribute must be added into the publishing code by the publisher.

If this attribute does not appear in your HTML or JavaScript publishing code:
  • Its value is presumed to be true.
  • You can add this attribute and set its value to false if you do not want titles to play continuously.

In the Brightcove Console: This attribute corresponds to the "Continue to the next video automatically" option available from Players > Settings.
preloadBackColor A hexadecimal value indicating the color you want displayed in the Player area while the Player is loading.

The default color is a white (FFFFFF).
You set this value in this script block by indicating the hexadecimal color value you want to use.

In the Brightcove Console: This attribute corresponds to the "Preloader background color" option available from Players > Settings.
playAll A Boolean value instructing the Player to play all Titles in a single Lineup upon loading.

Applies to Players templates with a Play All button.
playAll is similar to continuousPlay, except that it stops after a single playback of all Titles in the current Lineup only. If playAll mode begins after the first Title in a Lineup, the playback will cycle through all Titles and stop at the Title from which it started.

This attribute has the same effect as when the viewer of a Player clicks the Play All button.

See also: Customizing Player Behavior in a Page