UNPKG

tav-media

Version:

Cross platform media editing framework

191 lines (190 loc) 7.42 kB
/* global EmscriptenModule */ /** * Defines the rules on how to scale the content to fit the specified area. */ export var PAGScaleMode; (function (PAGScaleMode) { /** * The content is not scaled. */ PAGScaleMode[PAGScaleMode["None"] = 0] = "None"; /** * The content is stretched to fit. */ PAGScaleMode[PAGScaleMode["Stretch"] = 1] = "Stretch"; /** * The content is scaled with respect to the original unscaled image's aspect ratio. * This is the default value. */ PAGScaleMode[PAGScaleMode["LetterBox"] = 2] = "LetterBox"; /** * The content is scaled to fit with respect to the original unscaled image's aspect ratio. * This results in cropping on one axis. */ PAGScaleMode[PAGScaleMode["Zoom"] = 3] = "Zoom"; })(PAGScaleMode || (PAGScaleMode = {})); export var PAGViewListenerEvent; (function (PAGViewListenerEvent) { /** * Notifies the start of the animation. */ PAGViewListenerEvent["onAnimationStart"] = "onAnimationStart"; /** * Notifies the end of the animation. */ PAGViewListenerEvent["onAnimationEnd"] = "onAnimationEnd"; /** * Notifies the cancellation of the animation. */ PAGViewListenerEvent["onAnimationCancel"] = "onAnimationCancel"; /** * Notifies the repetition of the animation. */ PAGViewListenerEvent["onAnimationRepeat"] = "onAnimationRepeat"; /** * Notifies the update of the animation. */ PAGViewListenerEvent["onAnimationUpdate"] = "onAnimationUpdate"; /** * Notifies the play of the animation. */ PAGViewListenerEvent["onAnimationPlay"] = "onAnimationPlay"; /** * Notifies the pause of the animation. */ PAGViewListenerEvent["onAnimationPause"] = "onAnimationPause"; /** * Notifies the flushed of the animation. */ PAGViewListenerEvent["onAnimationFlushed"] = "onAnimationFlushed"; })(PAGViewListenerEvent || (PAGViewListenerEvent = {})); export var ParagraphJustification; (function (ParagraphJustification) { ParagraphJustification[ParagraphJustification["LeftJustify"] = 0] = "LeftJustify"; ParagraphJustification[ParagraphJustification["CenterJustify"] = 1] = "CenterJustify"; ParagraphJustification[ParagraphJustification["RightJustify"] = 2] = "RightJustify"; ParagraphJustification[ParagraphJustification["FullJustifyLastLineLeft"] = 3] = "FullJustifyLastLineLeft"; ParagraphJustification[ParagraphJustification["FullJustifyLastLineRight"] = 4] = "FullJustifyLastLineRight"; ParagraphJustification[ParagraphJustification["FullJustifyLastLineCenter"] = 5] = "FullJustifyLastLineCenter"; ParagraphJustification[ParagraphJustification["FullJustifyLastLineFull"] = 6] = "FullJustifyLastLineFull"; })(ParagraphJustification || (ParagraphJustification = {})); export var TextDirection; (function (TextDirection) { TextDirection[TextDirection["Default"] = 0] = "Default"; TextDirection[TextDirection["Horizontal"] = 1] = "Horizontal"; TextDirection[TextDirection["Vertical"] = 2] = "Vertical"; })(TextDirection || (TextDirection = {})); /** * Layers are always one of the following types. */ export var LayerType; (function (LayerType) { LayerType[LayerType["Unknown"] = 0] = "Unknown"; LayerType[LayerType["Null"] = 1] = "Null"; LayerType[LayerType["Solid"] = 2] = "Solid"; LayerType[LayerType["Text"] = 3] = "Text"; LayerType[LayerType["Shape"] = 4] = "Shape"; LayerType[LayerType["Image"] = 5] = "Image"; LayerType[LayerType["PreCompose"] = 6] = "PreCompose"; })(LayerType || (LayerType = {})); /** * Defines the rules on how to stretch the timeline of content to fit the specified duration. */ export var PAGTimeStretchMode; (function (PAGTimeStretchMode) { /** * Keep the original playing speed, and display the last frame if the content's duration is less * than target duration. */ PAGTimeStretchMode[PAGTimeStretchMode["None"] = 0] = "None"; /* * Change the playing speed of the content to fit target duration. */ PAGTimeStretchMode[PAGTimeStretchMode["Scale"] = 1] = "Scale"; /** * Keep the original playing speed, but repeat the content if the content's duration is less than * target duration. This is the default mode. */ PAGTimeStretchMode[PAGTimeStretchMode["Repeat"] = 2] = "Repeat"; /** * Keep the original playing speed, but repeat the content in reversed if the content's duration * is less than target duration. */ PAGTimeStretchMode[PAGTimeStretchMode["RepeatInverted"] = 3] = "RepeatInverted"; })(PAGTimeStretchMode || (PAGTimeStretchMode = {})); export var MatrixIndex; (function (MatrixIndex) { MatrixIndex[MatrixIndex["a"] = 0] = "a"; MatrixIndex[MatrixIndex["c"] = 1] = "c"; MatrixIndex[MatrixIndex["tx"] = 2] = "tx"; MatrixIndex[MatrixIndex["b"] = 3] = "b"; MatrixIndex[MatrixIndex["d"] = 4] = "d"; MatrixIndex[MatrixIndex["ty"] = 5] = "ty"; MatrixIndex[MatrixIndex["pers0"] = 6] = "pers0"; MatrixIndex[MatrixIndex["pers1"] = 7] = "pers1"; MatrixIndex[MatrixIndex["pers2"] = 8] = "pers2"; })(MatrixIndex || (MatrixIndex = {})); export var DecoderResult; (function (DecoderResult) { /** * The calling is successful. */ DecoderResult[DecoderResult["Success"] = 0] = "Success"; /** * Output is not available in this state, need more input buffers. */ DecoderResult[DecoderResult["TryAgainLater"] = -1] = "TryAgainLater"; /** * The calling fails. */ DecoderResult[DecoderResult["Error"] = -2] = "Error"; })(DecoderResult || (DecoderResult = {})); /** * Describes how pixel bits encode color. These values match up with the enum in Bitmap.Config on * Android platform. */ export var ColorType; (function (ColorType) { /** * uninitialized. */ ColorType[ColorType["Unknown"] = 0] = "Unknown"; /** * Each pixel is stored as a single translucency (alpha) channel. This is very useful to * efficiently store masks for instance. No color information is stored. With this configuration, * each pixel requires 1 byte of memory. */ ColorType[ColorType["ALPHA_8"] = 1] = "ALPHA_8"; /** * Each pixel is stored on 4 bytes. Each channel (RGB and alpha for translucency) is stored with 8 * bits of precision (256 possible values). The channel order is: red, green, blue, alpha. */ ColorType[ColorType["RGBA_8888"] = 2] = "RGBA_8888"; /** * Each pixel is stored on 4 bytes. Each channel (RGB and alpha for translucency) is stored with 8 * bits of precision (256 possible values). The channel order is: blue, green, red, alpha. */ ColorType[ColorType["BGRA_8888"] = 3] = "BGRA_8888"; })(ColorType || (ColorType = {})); /** * Describes how to interpret the alpha component of a pixel. */ export var AlphaType; (function (AlphaType) { /** * uninitialized. */ AlphaType[AlphaType["Unknown"] = 0] = "Unknown"; /** * pixel is opaque. */ AlphaType[AlphaType["Opaque"] = 1] = "Opaque"; /** * pixel components are premultiplied by alpha. */ AlphaType[AlphaType["Premultiplied"] = 2] = "Premultiplied"; /** * pixel components are independent of alpha. */ AlphaType[AlphaType["Unpremultiplied"] = 3] = "Unpremultiplied"; })(AlphaType || (AlphaType = {}));