bigbluebutton-Github/bigbluebutton-html5/imports/api/timer/server/helpers.js
Arthurk12 f5a5a960ba feat(timer): adds more songs
Adds 2 more songs to the timer, which can be switched using the radio
buttons inside timer panel.
Changed the music loop logic to make it gapless.
2023-05-18 15:29:35 -03:00

26 lines
435 B
JavaScript

import { Meteor } from 'meteor/meteor';
const TIMER_CONFIG = Meteor.settings.public.timer;
const MILLI_IN_MINUTE = 60000;
const TRACKS = [
'noTrack',
'track1',
'track2',
'track3',
];
const isEnabled = () => TIMER_CONFIG.enabled;
const getDefaultTime = () => TIMER_CONFIG.time * MILLI_IN_MINUTE;
const isTrackValid = (track) => TRACKS.includes(track);
export {
TRACKS,
isEnabled,
getDefaultTime,
isTrackValid,
};