added playing status js code