framo
Version:
Glorious media processing right in your browser with Typescript support
28 lines • 1.45 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Main = void 0;
const constants_1 = require("./constants/constants");
const ffmpeg_service_1 = require("./services/ffmpeg.service");
const filmstrip_service_1 = require("./services/filmstrip.service");
const frame_extractor_service_1 = require("./services/frame-extractor.service");
const frame_stitcher_service_1 = require("./services/frame-stitcher.service");
class Main {
constructor() {
this.ffmpegService = ffmpeg_service_1.FfmpegService.getInstance();
this.frameExtractorService = frame_extractor_service_1.FrameExtractorService.getInstance();
this.filmstripService = filmstrip_service_1.FilmstripService.getInstance();
this.frameStitcherService = frame_stitcher_service_1.FrameStitcherService.getInstance();
this.initializeFramo = () => this.ffmpegService.initializeFramo();
this.extractFrames = (config) => this.frameExtractorService.extractFrames(config);
this.makeFilmstrip = (config) => this.filmstripService.makeFilmstrip(config);
this.stitchFrames = (config) => this.frameStitcherService.stitchFrames(config);
}
initializationGuard() {
if (!this.ffmpegService.isReady) {
throw new Error(constants_1.ERROR_MESSAGES.FRAMO_NOT_INITIALIZED);
}
return this;
}
}
exports.Main = Main;
//# sourceMappingURL=main.js.map