refactor movieplayer.js to allow external call of init class