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

Möglichkeit, eine Slide zurückzugehen? falls man hängen bleibt #208

Open
NoemiThiede opened this issue Mar 31, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@NoemiThiede
Copy link
Collaborator

NoemiThiede commented Mar 31, 2023

No description provided.

@NoemiThiede NoemiThiede added the bug Something isn't working label Mar 31, 2023
@kalaschnik
Copy link
Member

Would require modifying the main procedure loop... sounds more like a post release thing

@kalaschnik
Copy link
Member

Putting the currentProcedure in global data, for example:

for (const [index, slide] of data.currentProcedure.entries()) {
		// save slides in global data object
		data.previousSlide = data.currentProcedure[index - 1];
		data.currentSlide = slide;
		data.nextSlide = data.currentProcedure[index + 1];
		data.slideCounter++;

		// init default procedure response
		data.procedure[slide] = {
			duration: 0,
			response: '',
		};

		// track dilemma slides

		// start time tracking
		const startTime = new Date().getTime();

		// iterate through the slides
		await (await import(`./${slide}`)).default();

		await sleep(config.globals.slideGapDuration);

		// stop audio playback if it is still playing anything
		stop();

		// save duration of each slide
		data.procedure[slide].duration = new Date().getTime() - startTime;
	}

You should also provide utility functions such as:

- goToSlideIndex()
- nextSlide()
- previousSide()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Post Release (Later)
Development

No branches or pull requests

2 participants