auto play directory using JS