{"_id":"59bba3e115d1e10024261659","category":{"_id":"59bba3e115d1e10024261653","version":"59bba3e115d1e10024261652","project":"55e6dcb32d0d3021000daf70","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-02T11:25:40.976Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"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-04T12:03:09.360Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"If you have been using SublimeVideo for your website, you might have been faced with it's termination of services. The team behind it created a great product, but then decided to not help users when terminating services.\n\nWe were put in the same situation as you might be in right now. We searched a lot and didn't find any real alternative to SublimeVideo, so we decided to create a player that can work as a drop-in replacement.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"How-To\"\n}\n[/block]\nIf your site is currently setup to use SublimeVideo, it's pretty easy to switch over to afterglow. Just replace their Javascript with afterglow. That's it. Can't believe it? Try it out. ;-)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Before\"\n}\n[/block]\nYou will have your SublimeVideo-Javascript in the `<head>` or at the bottom of you HTML file. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<!DOCTYPE html>\\n<html>\\n  <head>\\n    <!-- Some meta tags and so on -->\\n    <script type=\\\"text/javascript\\\" src=\\\"//cdn.sublimevideo.net/js/xxxxxxx.js\\\"></script>\\n  </head>\\n  <body>\\n    <!-- Some content including your players -->\\n  </body>\\n</html>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nJust replace the url pointing to SublimeVideo's CDN with a url pointing to afterglow.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"After\"\n}\n[/block]\nIt should look like this after exchanging the script:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<!DOCTYPE html>\\n<html>\\n  <head>\\n    <!-- Some meta tags and so on -->\\n    <script type=\\\"text/javascript\\\" src=\\\"//cdn.jsdelivr.net/npm/afterglowplayer:::at:::1.x\\\"></script>\\n  </head>\\n  <body>\\n    <!-- Some content including your players -->\\n  </body>\\n</html>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nSee? The only thing we changed is the `src` attribute of the `<script>` element. The players should now automatically be initialized when calling the page and use afterglow.\n\nYou don't have to change anything in your markup. Just leave everything else as it is.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"afterglow is not a complete copy of SublimeVideo\",\n  \"body\": \"afterglow does not support all features that were provided by SublimeVideo. We will try to add those features one after the other, but things will take their time. The most important parts (like browser compatibilty, format support, and so on) are covered, though.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Be independent if you want to!\"\n}\n[/block]\nWhen it comes to reliability, we promise not to behave like SublimeVideo. afterglow won't leave you hanging with no further support some day. If you use the CDN-hosted version (like in the example above), you can rely on jsDelivr to be a great CDN hosting thousands of open source projects and being driven by several great commercial CDNs. It won't disappear from one moment to the other.\n\nIf you don't want to rely on other people, just don't. You can self-host afterglow and run in on your own servers. Read more about this in the [self-hosting guide](doc:self-hosting-afterglow).","excerpt":"afterglow works as a drop-in replacement for SublimeVideo. This page tells you how and why.","slug":"replacing-sublimevideo","type":"basic","title":"Replacing SublimeVideo"}

Replacing SublimeVideo

afterglow works as a drop-in replacement for SublimeVideo. This page tells you how and why.

If you have been using SublimeVideo for your website, you might have been faced with it's termination of services. The team behind it created a great product, but then decided to not help users when terminating services. We were put in the same situation as you might be in right now. We searched a lot and didn't find any real alternative to SublimeVideo, so we decided to create a player that can work as a drop-in replacement. [block:api-header] { "type": "basic", "title": "How-To" } [/block] If your site is currently setup to use SublimeVideo, it's pretty easy to switch over to afterglow. Just replace their Javascript with afterglow. That's it. Can't believe it? Try it out. ;-) [block:api-header] { "type": "basic", "title": "Before" } [/block] You will have your SublimeVideo-Javascript in the `<head>` or at the bottom of you HTML file. [block:code] { "codes": [ { "code": "<!DOCTYPE html>\n<html>\n <head>\n <!-- Some meta tags and so on -->\n <script type=\"text/javascript\" src=\"//cdn.sublimevideo.net/js/xxxxxxx.js\"></script>\n </head>\n <body>\n <!-- Some content including your players -->\n </body>\n</html>", "language": "html" } ] } [/block] Just replace the url pointing to SublimeVideo's CDN with a url pointing to afterglow. [block:api-header] { "type": "basic", "title": "After" } [/block] It should look like this after exchanging the script: [block:code] { "codes": [ { "code": "<!DOCTYPE html>\n<html>\n <head>\n <!-- Some meta tags and so on -->\n <script type=\"text/javascript\" src=\"//cdn.jsdelivr.net/npm/afterglowplayer@1.x\"></script>\n </head>\n <body>\n <!-- Some content including your players -->\n </body>\n</html>", "language": "html" } ] } [/block] See? The only thing we changed is the `src` attribute of the `<script>` element. The players should now automatically be initialized when calling the page and use afterglow. You don't have to change anything in your markup. Just leave everything else as it is. [block:callout] { "type": "warning", "title": "afterglow is not a complete copy of SublimeVideo", "body": "afterglow does not support all features that were provided by SublimeVideo. We will try to add those features one after the other, but things will take their time. The most important parts (like browser compatibilty, format support, and so on) are covered, though." } [/block] [block:api-header] { "type": "basic", "title": "Be independent if you want to!" } [/block] When it comes to reliability, we promise not to behave like SublimeVideo. afterglow won't leave you hanging with no further support some day. If you use the CDN-hosted version (like in the example above), you can rely on jsDelivr to be a great CDN hosting thousands of open source projects and being driven by several great commercial CDNs. It won't disappear from one moment to the other. If you don't want to rely on other people, just don't. You can self-host afterglow and run in on your own servers. Read more about this in the [self-hosting guide](doc:self-hosting-afterglow).