// Central knobs for the party player. export const PORT = Number(process.env.PORT) || 3000; // Seconds of overlap between the outgoing and incoming video. // Audio and video crossfade over this whole window. export const OVERLAP_SECONDS = 5; // How fast the player switches when the user jumps around manually. export const HARD_CUT_SECONDS = 0.4; // The video frame takes up this fraction of the screen. Keep this below 0.5: // the corners animation puts a frame-sized image in all four corners, which // only stays overlap-free while two frames fit side by side. export const FRAME_SCALE = 0.3; // Pixels per second the frame drifts across the screen. export const BOUNCE_SPEED = 90; // The corners animation: seconds between screenshots. export const CORNER_INTERVAL_SECONDS = 5; // Gap between the frame and the screen edge, as a fraction of the short side. export const CORNER_MARGIN = 0.025; // The frame animations, keyed by the id sent over the socket. The names must // match the registry in public/player/motion.js, which supplies the code. export const ANIMATIONS = { bounce: { label: 'Bounce' }, corners: { label: 'Corners' }, }; // Cycle a fresh random animation on every track change. Anything else pins the // player to that one animation, which is what the queue page's buttons are for. export const AUTO_ANIMATION = 'auto'; export const DEFAULT_ANIMATION = AUTO_ANIMATION; // Selectable fullscreen backgrounds, keyed by the id sent over the socket. export const BACKGROUNDS = { pink: { label: 'Pink', src: '/assets/PLAKAT_A2_pink_426x600mm.png' }, plain: { label: 'Classic', src: '/assets/PLAKAT_A2_426x600mm.png' }, }; export const DEFAULT_BACKGROUND = 'pink';