Fix player.js bug.  Experiment with onbeforeunload.