added javascript for player controls