bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/service.js
2023-12-15 14:39:12 -03:00

26 lines
667 B
JavaScript
Executable File

import { makeCall } from '/imports/ui/services/api';
const POD_ID = 'DEFAULT_PRESENTATION_POD';
const previousSlide = (currentSlideNum, presentationId) => {
if (currentSlideNum > 1) {
makeCall('switchSlide', currentSlideNum - 1, POD_ID, presentationId);
}
};
const nextSlide = (currentSlideNum, numberOfSlides, presentationId) => {
if (currentSlideNum < numberOfSlides) {
makeCall('switchSlide', currentSlideNum + 1, POD_ID, presentationId);
}
};
const skipToSlide = (requestedSlideNum, presentationId) => {
makeCall('switchSlide', requestedSlideNum, POD_ID, presentationId);
};
export default {
nextSlide,
previousSlide,
skipToSlide,
};