Add logic to toggle play and pause buttons