Creating a Player Template

Applies to Roles
Publisher, Developer
Version
Brightcove 4
Modules
Publishing Module
Edition
Pro, Enterprise

Custom player templates are available only for Brightcove Pro and Enterprise customers. If you are interested in upgrading your Brightcove account, please contact Brightcove for more information.

In addition to the standard Brightcove player templates that are automatically available to you in the Publishing module, you can use any number of custom player templates you create yourself. You specify a custom player template using Brightcove's XML player specification, BEML. After you create the XML document that specifies your custom player template, you add the player template to your account by pasting the XML into a field in the Publishing module. Once you've added your custom player template in the Publishing module, you can create any number of instances of your custom player, just as you can with the standard Brightcove player templates.

Creating a custom player template can be as simple as taking an existing template and tweaking the colors or fonts or as complex as developing new custom player components and combining them in unprecedented ways. For detailed information about how to create a custom player template, see Customizing players with BEML.

Creating a new template in the Publishing module

Once you've created the the XML document that specifies your custom player template, here's how to create a new player template in the Publishing module:

  1. Click New Template.

    The Create New Template dialog opens:

  2. Enter a name and description for the new template. The name and description will be displayed in the Templates datagrid and the Create New Player dialog.
  3. Copy your XML document and paste it into the markup code field. Note that in some browsers, you need to paste with the right-click menu, rather than with Ctrl-V.
  4. Optionally, if your template does not already set a fixed width or height, you can set a default width or height for the template.
  5. Click Validate Code to make sure your XML defines a valid player template. When you click Validate Code, if your template has any validation errors under the BEML DTD, the template editing window's border turns red and the Format Code, Validate Code, Preview Template, and Save Changes buttons are disabled until you correct the error. The line number of the line with an error is highlighted in red, and if you mouse over the line number, you can read the error message for the validation error.

    Template with error

  6. Click Preview Template to see what your new player template looks like. Previewing your template also validates your template: you will not be able to preview an invalid template.
  7. Click Create Template.

Your new player template appears in the Publishing module in the Templates list. When you create a new player, this player template appears in the template selection drop-down.

Setting player dimensions

You can set the width and height of your players in several different ways:

  • Set the width and height in the BEML <Layout> element. Setting width or height in the <Layout> element prevents you from setting it in the Publishing module, and if the width or height is set in the BEML, the corresponding value will be grayed-out in the Create New Template dialog.
  • If you don't set the width or height in the BEML <Layout> element, you can set them in the Create New Template dialog. This sets a default width and height for all players created with this template. You can override a width or height set in the Publishing module by setting the width or height in the configuration parameters of a player's publishing code. For example, in JavaScript/HTML publishing code:
    <param name="width" value="500" />
    <param name="height" value="777" />
Tags
player templates