Project 'ds/pb-services' was moved to 'public-entries/pb-services'. Please update any links and bookmarks that may still have the old path.
Commit 345aa0f6 authored by Dmitriy Sintsov's avatar Dmitriy Sintsov 🤗

refactor(record): Delete legacy commented out code

parent 0b4a1994
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment