diff --git a/src/services/record/index.ts b/src/services/record/index.ts index d9fc3f79e9910644e32ea8c389912b506cba556a..46226cc51739d88e23a57177ac88911775d49e9e 100644 --- a/src/services/record/index.ts +++ b/src/services/record/index.ts @@ -13,10 +13,6 @@ enum STEPS { LISTEN } -enum ERRORS { - NO_FILE = 1 -} - class RecordService extends Observer implements AbstractService { _isActive: boolean _isAllow: boolean @@ -221,86 +217,6 @@ class RecordService extends Observer implements AbstractService { }, 10) } } - - // public start (): void { - // switch (this._step) { - // case STEPS.IDLE: - // case STEPS.STOP: { - // this.abort() - // clearInterval(this._interval) - - // this.record() - // break - // } - // } - // } - - // private record (): void { - // this._step = STEPS.RECORD - // this._time = 0 - // this._maxTime = this._config.duration - // this.api.audioService.start(Math.round(this._maxTime / 1000)) - // this.startTimer() - // } - - // public stop (): void { - // if (this._step === STEPS.RECORD) { - // clearInterval(this._interval) - - // this._step = STEPS.STOP - // this.api.audioService.stop() - // } - - // // if (this._step === STEPS.LISTEN) { - // // clearInterval(this._interval) - - // // this._step = STEPS.STOP - // // this.abort() - // // } - // } - - // public listen (): void { - // if (this._step !== STEPS.LISTEN) { - // this.abort() - - // this._step = STEPS.LISTEN - // this._maxTime = this._time - - // this._time = 0 - // clearInterval(this._interval) - - // this.startTimer() - - // this.api.dialogService.externalPlay('file://' + this._file, 60) - // } - // } - - // private abort (): void { - // this.api.dialogService.abortRobotReplic() - // this.api.dialogService.externalPlayStop() - // } - - // private reset (): void { - // clearInterval(this._interval) - // this._step = STEPS.IDLE - // this._time = 0 - // this._maxTime = this._config.duration - // this._file = '' - // } - - // private startTimer (): void { - // if (this._time < this._maxTime) { - // this._interval = setInterval(() => { - // this._time += 10 - - // if (this._time > this._maxTime) { - // this._time = this._maxTime - // this._step = STEPS.STOP - // clearInterval(this._interval) - // } - // }, 10) - // } - // } } export {