updated javascript to fix video poster reset bug