Lightbox setup

This page explains how to enable afterglow's reponsive scaling feature.

📘

All parameters on this page are optional

For a working player, you don't need more than the four mandatory parameters. All parameters on this page are optional, that means you don't have to use them.

If you are using afterglow to launch your player in a lightbox, you might want to customize the behaviour of the lightbox. Here are some parameters to do so.


data-overscale="false"

When passing this parameter to the <video> element, afterglow will not overscale your video when playing it in a lightbox. The lightbox will scale to fit into the screen but have a maximum width and height, which are defined by the width and height parameters.

If omitted, the player will scale the lightbox as large as possible while fitting it into the screen size.

You can see an example of a non-overscaling lightbox player here (second example on the page).


data-autoclose="true"

When passing this parameter to the <video> element, the lightbox will automatically be closed when the video has been played completely.

If omitted, the player will stop playback and show the poster frame (if there is one) when finished.