Setting the initial sound volume

This page shows you how to setup the initial sound volume of your player.

If you want your player to not have the full sound volume when it is initialized, you should use the data-volume parameter.

<!DOCTYPE html>
<html>
  <head>
    <title>afterglow player</title>
    <script src="//cdn.jsdelivr.net/npm/afterglowplayer@1.x"></script>
  </head>
  <body>
    <video class="afterglow" id="myvideo" width="1280" height="720" data-volume=".5">
    	<source type="video/mp4" src="/path/to/myvideo.mp4" />
    </video>
  </body>
<html>

You can provide a float value ranging from 0 to 1. data-volume=".5" will set the sound volume to 50%.

This is what a basic example with a poster frame could look like :

๐Ÿ“˜

Read more about player parameters

If you want to learn more about the player parameters that are available, you should take a look at the player parameters section.