Search Library
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:
|
| 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:
|
| 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:
|
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:
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
