Small refactor to clean up HTML5 MediaPlayer