Choosing the Player Size for an Embedded Video

Overview

The Embed Code Builder includes a Player size choice that sets how large the player is on your page. The player can keep its default size, use a fixed width in pixels, or fill the full width available on the page.

For example, a Fixed width of 960 gives a JavaScript embed code that contains width="960". A 16:9 video set to Auto in a column that is 1200 px wide is shown at 1200 x 675.

The choice applies to both embed methods, iframe and JavaScript. A new embed starts on Auto, because the Embed Code Builder assumes the iframe embed type until you choose one, and the player fills the full width of the iframe. The exception is an embed created with the API data connector, which always uses JavaScript and starts on Default size. Embeds that are already on a page do not change until you choose a size in the Embed Code Builder and save.

Before you set the player size, make sure the video is approved. For help choosing between the two embed methods, see Embedding the SundaySky Player in a Webpage.

Configuring the Player Size

  1. Open the relevant video in the Video Page.
    ▶ The video must be approved before it can be shared. If it is not, open the Edit tab and approve it first.
    The SundaySky Hosted Video panel on the Share tab, with the Embed Video row
  2. In the Share tab, next to Embed Video, click the plus sign.
    ▶ The Embed Code Builder opens. A preview of the player is displayed on the left.
    ▶ The right-hand panel has four sections: Poster Image, Player, Colors and NPS. The player size is set in the Player section.
  3. In the right-hand panel, open the Player section.
    ▶ The section has five switches and, below them, Player size.
  4. Under Player size, select the size that you want.
    ▶ Default size: 720 px wide (360 px for vertical videos, 512 px for 4:5), the same as before.
    ▶ Fixed width: the player is the number of pixels that you enter. The helper text reads Width in pixels.
    ▶ Auto: the player fills the available width of the page. The helper text reads Fills the available width of the page.
    ▶ The preview redraws at the size that you choose, so you can check it before you copy the code.
    The Player section of the Embed Code Builder showing the three Player size options
  5. If you selected Fixed width, enter a whole number greater than 0 in the Width in pixels field.
    Fixed width selected with 600 entered and the preview showing a narrower player
  6. (Optional) Check the preview, and use the desktop and mobile icons on the left to see both views.
    ▶ The player is displayed in horizontal or vertical view, depending on the aspect ratio of the video.
  7. Click Create at the bottom of the Embed Code Builder.
    ▶ If Fixed width is selected and the field is empty or not valid, Create is unavailable.
    ▶ Clicking Create saves an embed for the video. To change it later, see Editing the Embed Code below.
  8. In the Embed Video dialog, select the embed method that you want to use from the list next to Copy embed code.
    ▶ iframe: changes to the embed code are automatically applied when you save them. A change to the player size is the exception: copy the updated code, so the iframe height fits the video.
    ▶ JavaScript: copy and replace the embed code on your landing page each time you edit it.
    The embed type list showing iframe and JavaScript with their descriptions
  9. Click Copy code.
    ▶ For a personalized video, the dialog also shows Add required parameters to the landing page URL. Add the parameter ?id=INSERT_VALUE to the URL of your page, and replace INSERT_VALUE with the ID value from the spreadsheet ID column.
  10. On your webpage, paste the embed code where you want the player to appear.
    ▶ If your page is custom-developed, paste the code into the HTML. If you use a website builder such as WordPress or Squarespace, paste it into a custom code block.

For a JavaScript embed, the size is written into the width attribute of the code, for example width="960" for a fixed width of 960 or width="auto" for Auto.

Player Size: Additional Guidelines

  1. A new embed starts on Auto, because the builder assumes iframe until you choose the embed type. An embed for the API data connector always uses JavaScript, so it starts on Default size, and its code is the same as before.
    ▶ If you switch between the iframe and JavaScript embed types, the size you chose does not change.
    ▶ Embeds that are already on a page keep their size and appearance until you choose a size and save.
  2. A fixed width must be a whole number of pixels greater than 0.
    ▶ If the field is empty or the value is not valid, the field shows Enter a whole number of pixels greater than 0. and Create is unavailable until you fix it.
    ▶ The code is never generated with an invalid value.
    The Width in pixels field empty with the validation message and Create unavailable
  3. The player scales down proportionately when the section it is placed in is narrower than the width it would otherwise have.
    ▶ The height always follows from the width and the aspect ratio of the video.
  4. With Auto, an iframe embed fills the full width of the iframe, and the height follows the aspect ratio of the video.
    ▶ The embed code reserves the height of the player, so the whole player is visible.
    ▶ For 9:16 and 4:5 videos, Auto is capped: the player is never taller than the visitor's window and never narrower than Default size (360 px for 9:16, 512 px for 4:5). It keeps the aspect ratio of the video and fits itself again when the window is resized or the device is rotated.
    ▶ The cap does not apply to 16:9 videos, to Fixed width, or to Auto in a JavaScript embed.
    ▶ The table shows examples for a page 1906 px wide.
Video shape Visitor's window height Player size shown with Auto
16:9 Any 1906 x 1072 (not capped)
9:16 1000 px 563 x 1000
9:16 800 px 450 x 800
9:16 500 px 360 x 640 (Default size, not made narrower)
4:5 1000 px 800 x 1000
4:5 800 px 640 x 800
  1. In a JavaScript embed, the size is written into the width attribute of the code.
    ▶ Fixed width 960 gives width="960".
    ▶ Auto gives width="auto".
    ▶ After you change the size, copy the new code and paste it over the old code on your page.
  2. For a video that uses the SundaySky API data connector, the size choice works the same way, because the connector supports the JavaScript embed only.
  3. When NPS is on and Auto is selected, the builder shows The NPS survey appears below the player and stays at most 720 px wide, so it may look narrower than the player.
    ▶ The width of the survey depends on the shape of the video: 720 px for 16:9, 360 px for 9:16 and 512 px for 4:5, the same as the Default size.
    ▶ With NPS off, no message is shown.
    Auto selected with NPS on, showing the message about the NPS survey width
  4. The embed method is chosen in the Embed Video dialog.
    ▶ By default, iframe is selected. It is not selected if you enabled the NPS survey, you previously used the JavaScript embed code, or you created the video by duplicating a video that uses the JavaScript embed code.
    ▶ The code is isolated from the CSS of your page when you use an iframe.

Configuring Other Player Options

  1. In the Embed Code Builder, open the Player section.
  2. Turn on the switches that you want. Each switch has an information icon that explains it.
    ▶ Pin player bar: the player bar always appears below the video, instead of floating and appearing when the viewer hovers over or interacts with the video.
    ▶ Show transcript button: viewers can click the button to open a tab with the video transcript. It is on to start.
    ▶ Turn CC on by default: closed captioning is turned on by default, and the viewer can choose to turn it off.
    ▶ Show a large Play icon: a large icon is shown in the center of the video, instead of the standard small icon.
    ▶ Show a rectangular Play icon: a rectangular icon appears in the center of the video, instead of the round icon.
  3. (Optional) Open Poster Image and click Replace to use a different image, or click Edit to adjust the image.
    ▶ The default poster is labeled Default asset.
  4. (Optional) Open Colors and select the Play button color.
  5. (Optional) Turn on NPS to add a Net Promoter Score question at the end of the video.
    ▶ The question is: After watching this video, on a scale of 0 to 10, how likely are you to recommend our business to a friend or colleague?
    ▶ NPS requires the JavaScript embed code.

Editing the Embed Code

  1. Open the video in the Video Page.
  2. In the Share tab, click Embed Video.
  3. In the Embed Video dialog, click the pencil icon.
    ▶ The Embed Code Builder opens with your saved choices, including the Player size you selected.
    ▶ To see when the embed was created and last updated, click the three-dot menu in the dialog and click Details.
    The Embed Code Builder opened from the pencil icon with Auto still selected and the Apply changes button
  4. Change the Player size as required.
  5. Click Apply changes.
    ▶ If you changed the Player size of an iframe embed, the Apply Changes? window appears. It says that all changes will be immediately visible to viewers and asks you to copy the updated embed code so the iframe height fits the video. Click Apply.
    ▶ If you turn NPS off, the iframe option becomes available in the Embed Video dialog after you apply the change.

When you change a setting other than the player size in an iframe embed, the player on your page is updated automatically. When you change the player size of an iframe embed, the Embed Video dialog opens with the updated code. Click Copy code and paste it over the old code on your page, so the iframe height fits the video. When you work with JavaScript, the message Replace your embed code to apply these changes appears. Click Copy code and paste the new code over the old code on your page.

Previewing the Embed

The preview in the Embed Code Builder redraws at the size that you choose. To check the other view, use the desktop and mobile icons on the left.

To show the player to colleagues before it goes live, click the three-dot menu in the Embed Video dialog and click Preview. The preview page opens in a new tab, shows the player at the size that you chose, and stays active for seven days.

Note: With an iframe, an edit that you save is applied to your page automatically, except that a change to the player size needs the updated code. Share the preview page after the code is created and before you paste it into your page.

Notes

  1. If your page uses a website builder such as WordPress or Squarespace, paste the embed code into a custom code block. Video embed blocks are often incompatible with the SundaySky embed codes.
  2. Embeds that are already on a page keep their size and appearance until you choose a size and save.
  3. For the other attributes that you can set in a JavaScript embed, see SundaySky JavaScript Embed Code: Player Attributes.

Limitations

  1. The NPS survey works only with the JavaScript embed. While NPS is on, the iframe option is unavailable, and the selector shows The iframe embed code is incompatible with the NPS Survey. Disable the NPS Survey in the embed code builder to switch to the iframe embed code.
  2. Percentage sizes, such as 80%, are not offered in the Embed Code Builder and are not supported.
  3. The player size does not change the quality at which the video is rendered or streamed.
Was this article helpful?
0 out of 0 found this helpful

Still Have Questions?

SundaySky Support is here for you

contact support