JS function to control HTML5 Video