Publishing a Video Cloud Player

Product
Video Cloud
Applies to Roles
Publisher
Version
Brightcove 5
Modules
Publishing Module
Edition
All

In this document, you'll learn how to generate player publishing code from the Publishing module to publish your Video Cloud player. We explain the different publishing code formats the Publishing module can generate, the advantages of using JavaScript for your generated code, how to get your publishing code, and how to modify it.

By understanding the different player publishing code types the Publishing module can generate, you'll be able to choose the right type for your various publishing platforms. You will know how to get publishing code and how and when to modify it.

If you're not already familiar with the Publishing module, read Getting Started with the Publishing Module. If you haven't yet created a player, you can learn how to create one in Creating Players with the Publishing Module.

The Publishing module can generate player publishing code in several formats, each of which will publish your player:

  • JavaScript. Use JavaScript to insert the player into an HTML web page or pop-up window. The JavaScript embed code is the preferred approach for publishing a Video Cloud player and supports the Video Cloud smart player feature, which enables both Flash and HTML5 delivery.
  • ActionScript. Use ActionScript to insert the player into a Flash movie or Flex application.
  • HTML to embed. Use this HTML to embed the player into an HTML web page or pop-up window. Choose HTML as the publishing code for places that disallow JavaScript, such as social networking sites like MySpace or other services such as blogs. Note: If you use HTML embed code, you lose the ability to control where this content is displayed, you also lose some reporting capability, and you cannot take advantage of the smart player feature.
  • Publishing URL. Use this URL to link to the player from any web site, e-mail, blog, etc. This option is also handy for launching a player in a pop-up window. Note that the Publishing URL option is not available if you have selected Host on your URL in the Global settings tab for this player.

Advantages of using JavaScript player publishing code

Using the JavaScript publishing code is the preferred approach. While loading the required JavaScript library adds a small amount to the page's load size, it provides a number of advantages over the HTML embed code, as follows:

  • Only the JavaScript player publishing code supports the Video Cloud smart players, which automatically switch between Flash and HTML5 mode, depending on the capabilities of the viewer's device.
  • The page can automatically prompt the viewer if they do not have Flash installed or their version of Flash is too old.
  • It provides the ability to add and remove (and clean up) players dynamically.
  • You have the option to delay player load until the rest of the page has loaded, helping you work around loading issues in older browsers.
  • You can use URL query parameters in player links to link to players and force playback of particular videos in the player.

Getting the player publishing code

To get the publishing code for a player:

  1. In the Publishing module, select the player.
  2. On the Action Toolbar, click Get Code.
  3. Select a publishing code option to open the Get Code dialog and get the correct code snippet. You can select one of the following choices: JavaScript, ActionScript, HTML to Embed, or Player URL. When the Get Code dialog opens, it displays the right code for the publishing option you selected.
  4. Click Copy Code or Copy Link to copy the code to your clipboard.
  5. Paste the code from your clipboard into its destination file.

You can also use the Quick Video Publishing feature in the Media module to get the publishing code for a single-video player.

Modifying the publishing code

In most cases, you can just get the player publishing code from the Publishing module and paste it into your web page or other destination file. However, in some cases, you'll want to configure the player by modifying parameters in the publishing code. Two examples are disabling FMS dynamic streaming and embedding a player on an HTTPS web page. For information about how to use configuration parameters to modify a player, see Player Configuration Parameters.

Tags
embed code, publishing code