Available Options for the Standard (iframe) Embed Code

In this topic, you will learn about the use and configuration of the iframe embed code. This version of the player implementation is also referred to as the Standard player code.

Introduction

The iframe player implementation code provides the ease of use of the player as a single, contained unit. This is often required for social media applications and sharing.

Usage

To use the iframe code follow these steps:

  1. Use the PLAYERS module to create a player.
  2. Go to the MEDIA module and publish a video using the newly created player.
  3. Copy the Standard embed code. The HTML will be similar to the following:
    <iframe src="https://players.brightcove.net/.../index.html?videoId=6116779877001"
      allowfullscreen=""
      allow="encrypted-media"
      width="960" height="540"></iframe>
  4. Copy the HTML from the browser and paste into the body of a full HTML page.
  5. Browse the HTML page to see the player functioning.

Query parameters

Numerous query parameters are available for the iframe tag to provide additional information about how a player should behave. The table below details available parameters.

Parameter Description Data Type
adConfigId A Dynamic Delivery SSAI ad configuration ID. String
applicationId Allows re-use of a single player, but differentiates analytics on a per-site or per-application basis. See the Adding an Application ID to the Player Embed Code document for full details. String
autoplay Indicates that the player should start playing immediately, on platforms where this is allowed.

If autoplay is set to a Boolean value the browser's native autoplay behavior is used. If it is set to one of the following three valid string values, the following occurs:
  • play: The player will manually try to call play.
  • muted: The player will manually mute the player and call play.
  • any: The player will first try to call play. If that fails, mute the player and call play.
If any of the above fail, the player will display the "Big Play Button" as if autoplay was set to false.

Getting a video to autoplay can be a complex situation. See the Autoplay Considerations document for further details.
Boolean or String
crossorigin If true, the underlying <video> element will have crossorigin="anonymous". This means that any videos or text tracks pulled into the player must have CORS headers. Boolean
deliveryConfigId A Dynamic Delivery Rules configuration ID String
language Sets the language (using a valid language code, usually two letters) for the player. String
loop Causes the video to start over as soon as it ends. String
muted Mutes the video's sound. Boolean
playlistId Sets the ID or reference ID of the playlist in the player. String
playlistVideoId Sets the initial video to be played in the video, which must be in the designated playlist. String
playsinline If the platform and OS allow it, will display video content within the player's playback area, meaning it won't be displayed fullscreen or in an independent, resizable window; does work on iPhone and iPad Boolean
preload Informs the browser whether or not the video data should begin downloading as soon as the video tag is loaded. Possible values are none, metadata or auto. See the next section for further details. String
referrer Allows you to pass in the document.referrer along with other parameters to the iframe, allowing you to accurately track the referrer URL for the video. Note that you will need to URI encode the value - for example: referrer=http%3A%2F%2Ffoo.com. Also note that this parameter is available for the 6.25 version of the player or later. String
t Sets the time offset from which a video will start playing. See the Deep Linking document for details. String
videoId Sets the ID or reference ID of the video in the player. String

preload details

The preload parameter informs the browser whether or not the video data should begin downloading as soon as the video tag is loaded. The options are auto, metadata, and none. For HLS playback technology the settings mean slightly different things and noted below.

  • auto (default): Start loading the video immediately (if the browser agrees). Some mobile devices like iPhones and iPads will not preload the video in order to protect their users' bandwidth. This is why the value is called auto and not something more final like true.

  • metadata: Load only the meta data of the video, which includes information like the duration and dimensions of the video.

  • none: Don't preload any of the video data. This will wait until the user clicks play to begin downloading. Note that on iOS there may be segment downloading even with this setting. See the Brightcove Player and iOS document for more information.

      <video-js preload ...>
      or
      { "preload": "auto" }