Constants
String constants
/**
* Default output options for transcoding
* of video into bitmaps.
*/
const ALPHA_BITMAPS_OUTPUT_DEFAULTS = {
format: 'image2',
width: 320,
height: 240,
videoRate: 10,
extension: 'png'
}
/**
* Default output options for transcoding
* of transparent images.
*/
const ALPHA_IMAGE_OUTPUT_DEFAULTS = {
width: 320,
height: 240,
extension: 'png',
format: 'image2',
offset: 0
}
/**
* Default output options for transparent
* media by transcode source.
*/
const ALPHA_OUTPUT_DEFAULTS = {
image: {
width: 320,
height: 240,
extension: 'png',
format: 'image2',
offset: 0
},
bitmaps: {
format: 'image2',
width: 320,
height: 240,
videoRate: 10,
extension: 'png'
},
video: {
options: {
g: 60,
level: 41,
movflags: 'faststart'
},
width: 1920,
height: 1080,
videoRate: 30,
videoBitrate: 2000,
audioBitrate: 160,
audioCodec: 'aac',
videoCodec: 'libx264',
audioChannels: 2,
audioRate: 44100,
g: 0,
format: 'mp4',
extension: 'mp4'
}
}
/**
* Default output options for encoded and
* transcoded video.
*/
const ALPHA_VIDEO_OUTPUT_OPTIONS = {
options: {
g: 60,
level: 41,
movflags: 'faststart'
},
width: 1920,
height: 1080,
videoRate: 30,
videoBitrate: 2000,
audioBitrate: 160,
audioCodec: 'aac',
videoCodec: 'libx264',
audioChannels: 2,
audioRate: 44100,
g: 0,
format: 'mp4',
extension: 'mp4'
}
const AUDIBLE_TYPES = [
'audio',
'video'
]
const AUDIO_OBJECT = {
type: 'audio'
}
const COMPOSED_EVENT = {
bubbles: true,
cancelable: true,
composed: true
}
const FETCH_TYPES = [
'video',
'audio',
'image',
'ttf',
'woff2'
]
const FILE_TYPES = [
'font',
'video',
'audio',
'image'
]
const FONT_TYPES = [
'ttf',
'woff2'
]
const IMPORT_TYPES = [
'video',
'audio',
'image',
'text',
'shape'
]
const KNOWN_SOURCES = [
'color',
'mash',
'raw',
'shape',
'text'
]
const KNOWN_TYPES = [
'containerId',
'contentId',
'fra',
'flo',
'pix',
'dim',
'deg',
'rat',
'per',
'boo',
'int',
'rgb',
'str',
'search'
]
const MEDIA_TYPES = [
'video',
'audio',
'image'
]
const MIME_SVG = 'image/svg+xml'
/**
* Default output options by transcode
* source.
*/
const OUTPUT_DEFAULTS = {
audio: {
options: {},
audioBitrate: 160,
audioCodec: 'libmp3lame',
audioChannels: 2,
audioRate: 44100,
extension: 'mp3'
},
bitmaps: {
options: {},
format: 'image2',
width: 320,
height: 240,
videoRate: 10,
extension: 'jpg'
},
waveform: {
options: {},
height: 100,
forecolor: '#000000',
backcolor: '#00000000',
audioBitrate: 160,
audioCodec: 'aac',
audioChannels: 2,
audioRate: 44100,
extension: 'png'
},
image: {
options: {},
width: 320,
height: 240,
extension: 'jpg'
},
video: {
options: {
level: 41,
movflags: 'faststart'
},
width: 480,
height: 270,
videoRate: 30,
videoBitrate: 2000,
audioBitrate: 160,
audioCodec: 'aac',
videoCodec: 'libx264',
audioChannels: 2,
audioRate: 44100,
format: 'mp4'
}
}
const POINT_ZERO = {
x: 0,
y: 0
}
const PREVIEWABLE_PROPS = {
label: {},
preview: {
attribute: false
},
head: {
attribute: false
},
icon: {}
}
const RECTS_ZERO = [
{
x: 0,
y: 0,
width: 0,
height: 0
},
{
x: 0,
y: 0,
width: 0,
height: 0
}
]
const RECT_ZERO = {
x: 0,
y: 0,
width: 0,
height: 0
}
const SIZE_OBSERVED_PROPS = {
sizeWidth: {
attribute: 'size-width',
reflect: true
},
sizeHeight: {
attribute: 'size-height',
reflect: true
}
}
const SIZE_OBSERVER_PROPS = {
sizeById: {
attribute: false
}
}
const SIZE_OUTPUT = {
width: 1920,
height: 1080
}
const SIZE_ZERO = {
width: 0,
height: 0
}
const VIDEO_OBJECT = {
type: 'video'
}
const VISIBLE_TYPES = [
'image',
'video'
]
const VISI_OBSERVED_PROPS = {
visibility: {}
}
const VISI_OBSERVER_PROPS = {
visibilityById: {
attribute: false
}
}