Imported AOS WebPlayer code from https://bitbucket.org/artofsequence/aos