modify player.js to match module pattern