2024-01-24 00:41:15 +08:00
|
|
|
import PollService from '/imports/ui/components/poll/service';
|
|
|
|
import AudioService from '/imports/ui/components/audio/service';
|
|
|
|
|
2024-01-12 00:51:51 +08:00
|
|
|
const MAX_CHAR_LENGTH = 5;
|
|
|
|
|
|
|
|
export const shouldStackOptions = (keys: Array<string>) => keys.some((k) => k.length > MAX_CHAR_LENGTH);
|
|
|
|
|
2024-05-29 21:26:11 +08:00
|
|
|
const playAlert = () => {
|
|
|
|
const APP_CONFIG = window.meetingClientSettings.public.app;
|
|
|
|
|
|
|
|
return AudioService.playAlertSound(
|
2024-08-03 02:10:39 +08:00
|
|
|
`${APP_CONFIG.cdn + APP_CONFIG.basename}/resources/sounds/Poll.mp3`,
|
2024-05-29 21:26:11 +08:00
|
|
|
);
|
|
|
|
};
|
2024-01-24 00:41:15 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
shouldStackOptions,
|
|
|
|
pollAnswerIds: PollService.pollAnswerIds,
|
|
|
|
pollTypes: PollService.pollTypes,
|
|
|
|
isDefaultPoll: PollService.isDefaultPoll,
|
|
|
|
playAlert,
|
|
|
|
};
|