ajaxified video player, needs refactoring