Popcorn js support

@zoharbabin there were some small changes made to the code to support popcorn js, that were never merged. Adding them in a pull request, will try and re-review and merge soon. This way our master branch can work with the [associated popcorn branch](https://github.com/mdale/popcorn-js). Ultimately we will want to add the popcorn player / maker as on-page plugins so they can be invoked with standard uiConf params.