We felt a little left hanging when SublimeVideo went away without giving us a solution for the future. In the process of creating afterglow, we always had a focus on self hosting and giving people the possibility to be completely independent with afterglow.
Self hosting afterglow is quite easy.
You'll have to download afterglow's main file. The latest release is always available at https://github.com/moay/afterglow/releases.
There is no need for you to download the entire repository, it's enough to get the
afterglow.min.js which you will find in the
afterglow.zip available with each release (or contained in the
dist folder of the repo).
You can also install afterglow via bower. Just run
bower install afterglow
Additionally, you can use npm to download afterglow:
npm install afterglowplayer
After having downloaded afterglow, all you have to do is to upload the file
afterglow.min.js somewhere it can be accessed via a public url. This url should not change at any time (no dynamic urls or dynamic IPs and so on).
From now on, you are self hosted and you can use your self hosted version for your webpages.
Quick example: if you have a webspace with a domain
example.com pointing towards the folder where your version of afterglow is located, you should add
<script type="text/javscript" src="//example.com/afterglow.min.js"></script>
<head> or somewhere in the markup of your page. Read more about how to use afterglow in the basic player setup guide. Everything but the url via which you access afterglow stays the same.
Make sure to use GZIP compression
When afterglow is served via the CDN, it comes gzipped with a size of ~80KB, which is quite cool for a fully working video solution. If you don't serve it gzipped, it will have a size of ~340KB, which is quite heavy for mobile devices.
If you want to learn how to enable GZIP compression, we recommend reading this guide.
Make sure to use SSL
You may have noticed, that the example does not have
httpsin it, just the
//at the beginning of the
srcattribute. This type of url is called protocol relative url which means, that the protocol will be chosen depending on the currently used one. (?)
In order to have this properly working, you MUST provide a valid SSL certificate to the domain where your version of afterglow is hosted. It will of course also work with plain old
http://example.com/afterglow.min.jsand without using SSL, but it's strongly recommended to provide SSL support.
Updated less than a minute ago