Using the API

You'll find some of afterglow's API functions in action here.

Let's first create a basic player like this:

<!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">
        <source type="video/mp4" src="/path/to/myvideo.mp4" />
    </video>
  </body>
<html>

This is what the player looks like:

Now lets manipulate it by using some API functions.

And lets use some diagnostic functions.