{"_id":"59bba3e215d1e1002426166b","category":{"_id":"59bba3e115d1e10024261656","version":"59bba3e115d1e10024261652","project":"55e6dcb32d0d3021000daf70","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-04T14:49:28.154Z","from_sync":false,"order":2,"slug":"player-parameters","title":"Parameters"},"user":"55e6dc8a2d0d3021000daf6e","project":"55e6dcb32d0d3021000daf70","parentDoc":null,"version":{"_id":"59bba3e115d1e10024261652","project":"55e6dcb32d0d3021000daf70","__v":1,"createdAt":"2017-09-15T09:56:49.752Z","releaseDate":"2017-09-15T09:56:49.752Z","categories":["59bba3e115d1e10024261653","59bba3e115d1e10024261654","59bba3e115d1e10024261655","59bba3e115d1e10024261656","59bba3e115d1e10024261657"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-04T14:49:52.168Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"There are the four parameters that **must** be applied to the `<video>` element.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"afterglow needs these parameters\",\n  \"body\": \"If you omit one or more of these parameters, that will cause afterglow to fail.\"\n}\n[/block]\n> class=\"afterglow\"\n\nYou must provide 'afterglow' to your `<video>` element. This tells afterglow, that this video element should be converted to a player instance.\n\nThere are two exceptions from this rule:\n- You are replacing SublimeVideo and your players are using the class 'sublime'. afterglow will recognize this, so you don't have to exchange everything.\n- You are playing in a lightbox. Read more about this case in the [lightbox guide](doc:lightbox-player).\n\n---\n\n> id=\"*unique-value*\"\n\nYou must provide a unique id for your `<video>` element. The players are identified by this id and some features won't work without this.\n\n---\n\n> width=\"*X*\" *and* height=\"*X*\"\n\nYou must provide width and height (number of pixels) to your `<video>` element. They will define how wide and high your element is.\n\nWe 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.\n\n---\n\nYou can see a working player with just those four parameters [here](doc:basic-player).","excerpt":"This page will show you which player parameters are mandatory and what they do.","slug":"mandatory-parameters","type":"basic","title":"Mandatory parameters"}

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. [block:callout] { "type": "danger", "title": "afterglow needs these parameters", "body": "If you omit one or more of these parameters, that will cause afterglow to fail." } [/block] > 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](doc:lightbox-player). --- > 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](doc:basic-player).