public void toggle() {
   if (isSurfaceCreated) {
     if (handler == null) start();
     else if (handler.isStop()) {
       resume();
     } else pause();
   }
 }
 @Override
 public void start() {
   start(0);
 }
 public void restart() {
   stop();
   start();
 }