Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (ui): implement speed controls #1206

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add speed factor to timer state
jwetzell committed Sep 5, 2024
commit dce25f3f36d1212d06f7b427cd7c781e45503a4e
1 change: 1 addition & 0 deletions apps/server/src/stores/runtimeState.ts
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ const initialTimer: TimerState = {
playback: Playback.Stop, // change initiated by user
secondaryTimer: null, // change on every update
startedAt: null, // change can only be initiated by user
speed: 1.0, //change initiated by user
} as const;

export type RuntimeState = {
2 changes: 2 additions & 0 deletions packages/types/src/definitions/runtime/TimerState.type.ts
Original file line number Diff line number Diff line change
@@ -30,4 +30,6 @@ export type TimerState = {
secondaryTimer: MaybeNumber;
/** only if timer has already started */
startedAt: MaybeNumber;
/** the speed of the current timer 1.0 = realtime, 2.0 = double time */
speed: number;
};