StartPTT static method

void StartPTT()

开始对讲

Implementation

static void StartPTT() async {
  Log.i(tag, "StartPTT");
  if(!settingChangeNotifier.enablePTT){
    playText(getTranslation("PTTIsClosed"), true);
    ToastUtils.instance.show(getTranslation("PTTIsClosed"));
    return;
  }

  if (checkIsOnline()) {
    if (checkIsInGroup()) {
      //更新时间戳
      lastRecordAndPlayTime = DateTime.now().millisecondsSinceEpoch;
      PlatformMethodInvokeHandler.invokeMethod("StartPTT");

      //60s后取消对讲的定时器
      startCancelPTTTimer();
    }
  }
}