diff --git a/src/app/pages/modus/focus/focus.component.ts b/src/app/pages/modus/focus/focus.component.ts index 6f4db74..17fcd6e 100644 --- a/src/app/pages/modus/focus/focus.component.ts +++ b/src/app/pages/modus/focus/focus.component.ts @@ -17,12 +17,15 @@ export class FocusPage implements OnInit, OnDestroy { private timerStarted: number | null = null; state: FocusState = FocusState.STOPPED; + private endOfTimerChime: HTMLAudioElement; pathD: string = 'M100 10 A90 90 0 1 1 0 0'; dashOffset = 0; - constructor(private renderer: Renderer2) {} + constructor(private renderer: Renderer2) { + this.endOfTimerChime = new Audio('../../../assets/race-start-beeps-125125.mp3'); + } ngOnInit() { this.updateTimeDisplay(this.duration * 60, 0, 1); @@ -55,6 +58,9 @@ export class FocusPage implements OnInit, OnDestroy { if (progress >= 1) { progress = 1; + this.endOfTimerChime.play().catch(error => { + console.error('Error playing audio:', error); + }); clearInterval(this.interval); } @@ -96,7 +102,7 @@ export class FocusPage implements OnInit, OnDestroy { reload() { this.state = FocusState.SHORT_BREAK; - this.startTimer(5); + this.startTimer(0.5); } recharge() { diff --git a/src/assets/race-start-beeps-125125.mp3 b/src/assets/race-start-beeps-125125.mp3 new file mode 100644 index 0000000..2f845ac Binary files /dev/null and b/src/assets/race-start-beeps-125125.mp3 differ