added play, pause and autplay features