Generating Player Embed Code
The Players module provides the ability to generate the player embed code and player URL for both preview and published players. Typically, you would generate the embed code for a player using the Players module when you want to dynamically assign a video to the player at runtime. For information on assigning videos to a player dynamically, see Dynamically Assigning Videos to a Player.
If you are a customer looking to publish a playlist or a single video to a player, use the publish function inside the Media module. For more information, see Publishing Videos and Playlists with the Media Module.
Types of embed code
There are two types of embed code that can be generated:
- iframe - Recommended for most cases. Places the player inside an
<iframe>tag. If player dimensions are specified, the iframe will be sized to the player dimensions. If no player dimensions are specified, the iframe can be placed inside of a<div>tag and the responsive nature of the player will resize the player to occupy the entire space of the<div>. - JavaScript - Allows the player to exist in the the HTML page directly, not in an iframe. This offers developers the benefits of ease of accessing the player and associated properties and events. By using the JavaScript embed code, you lose the ease of use of the player as a single, contained unit in social media applications and sharing.

Generating embed code for a Player
To generate the embed code for a Player:
- Open the Players module.
- Click the three-dot menu to the right of the player name for the player you want to generate the code for. Don't click on the player name and open the properties page.
- Click Embed & Preview on the opened detail page.
- In the Embed Player dialog, click Preview Player to preview the player and when ready select the appropriate embed code tab (iframe or JavaScript).
Adding an application ID to the embed code
In the past, publishers would commonly create new players with different names to use on different parts of a site or to use on different sites. When reviewing player analytics, having different player names made it easier to determine which players were getting the most views. By adding an application ID parameter to the embed code, the same player can be used across a site, or sites, and the application ID can be used to identify where the player was published. Using a player application ID can help reduce the number of players that need to be created and maintained. For information on adding an application ID to the embed code, see Adding an Application ID to the Player Embed Code.