Videos autoplay

Fully implemented video autoplay feature and added option in settings menu. There were also a lot of javascript refactorings, specifically adding youtube API to replace iframe embedding.