rewrite of video player