add play and pause in fragment lifecycle.