Mandatory parameters

This page will show you which player parameters are mandatory and what they do.

There are the four parameters that must be applied to the <video> element.

❗️

afterglow needs these parameters

If you omit one or more of these parameters, that will cause afterglow to fail.

class="afterglow"

You must provide 'afterglow' to your <video> element. This tells afterglow, that this video element should be converted to a player instance.

There are two exceptions from this rule:

  • You are replacing SublimeVideo and your players are using the class 'sublime'. afterglow will recognize this, so you don't have to exchange everything.
  • You are playing in a lightbox. Read more about this case in the lightbox guide.

id="unique-value"

You must provide a unique id for your <video> element. The players are identified by this id and some features won't work without this.


width="X" and height="X"

You must provide width and height (number of pixels) to your <video> element. They will define how wide and high your element is.

We do recommend to use afterglow's responsive scaling (see below). If you do so, the width and height should be matching your original video size (e.g. 1920 and 1080) so that afterglow can scale according to the original ratio of your video.


You can see a working player with just those four parameters here.


Did this page help you?