UNPKG

framo

Version:

Glorious media processing right in your browser with Typescript support

51 lines 2.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Framo = exports.Presets = exports.FilmstripOrientation = exports.FramoVideoExtension = exports.FramoImageExtension = void 0; const main_1 = require("./main"); const filmstrip_model_1 = require("./models/filmstrip.model"); Object.defineProperty(exports, "FilmstripOrientation", { enumerable: true, get: function () { return filmstrip_model_1.FilmstripOrientation; } }); const generic_model_1 = require("./models/generic.model"); Object.defineProperty(exports, "FramoImageExtension", { enumerable: true, get: function () { return generic_model_1.FramoImageExtension; } }); Object.defineProperty(exports, "FramoVideoExtension", { enumerable: true, get: function () { return generic_model_1.FramoVideoExtension; } }); Object.defineProperty(exports, "Presets", { enumerable: true, get: function () { return generic_model_1.Presets; } }); const ffmpeg_service_1 = require("./services/ffmpeg.service"); class Framo { constructor() { this._ffmpegService = ffmpeg_service_1.FfmpegService.getInstance(); this._main = new main_1.Main(); /** * @description Initialize Framo and its dependencies */ this.initializeFramo = () => this._main.initializeFramo(); /** * @description Extract frames from a video at specific times or regular intervals * @param config * @returns */ this.extractFrames = (config) => this._main.initializationGuard().extractFrames(config); /** * @description Make a filmstrip using frames at regular intervals * @param config * @returns */ this.makeFilmstrip = (config) => this._main.initializationGuard().makeFilmstrip(config); /** * @description Stitch frames to make video * @param config * @returns */ this.stitchFrames = (config) => this._main.initializationGuard().stitchFrames(config); /** * @description Emits that framo is ready * @event */ this.progress = this._ffmpegService.progress; /** * @description Emits the progress of the operation * @event */ this.ready = this._ffmpegService.ready; } } exports.Framo = Framo; //# sourceMappingURL=browser.js.map