Skip to content

Commit

Permalink
refactor: Add Playback.ts for defining playback types and interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
drikusroor committed Aug 9, 2024
1 parent 3340bdd commit d2f5bb4
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions frontend/src/types/Playback.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export const AUTOPLAY = "AUTOPLAY";
export const BUTTON = "BUTTON";
export const MULTIPLAYER = "MULTIPLAYER";
export const IMAGE = "IMAGE";
export const MATCHINGPAIRS = "MATCHINGPAIRS";
export const PRELOAD = "PRELOAD";

export type PlaybackView = typeof AUTOPLAY | typeof BUTTON | typeof MULTIPLAYER | typeof IMAGE | typeof MATCHINGPAIRS | typeof PRELOAD;

type PlaybackMethod = "EXTERNAL" | "HTML" | "BUFFER" | "NOAUDIO";

export interface PlaybackArgs {
view: PlaybackView;
play_method: PlaybackMethod;
mute: boolean;
play_once: boolean;
resume_play: boolean;
show_animation: boolean;
timeout_after_playback: number;
preload_message: string;
instruction: string;
labels: { [key: string]: string };
images: { [key: string]: string };
sections: any[];
style: any;
stop_audio_after: number;
play_from: number;
score_feedback_display: string;
}

0 comments on commit d2f5bb4

Please sign in to comment.