MeiCam SDK For Web  3.12.1
Classes | Functions | Variables
NvEffectSdk.js File Reference

Doc of Effect SDK WEB APPLICATION. More...

Classes

class  NveVectorVal
 vector contains object type values More...
 
class  NveVolume
 volume More...
 
class  NveMotionParameters
 Motion parameter information. More...
 
class  NveCaptionSpan
 layout attributes class More...
 
class  NvePointF
 Two dimensional coordinates point, parameter type is double or float. More...
 
class  NveRectF
 rectangular More...
 
class  NveRational
 Rational. More...
 
class  NveColor
 Custom color class In the SDK, the NveColor class attributes, namely r, g, b and a, range [0, 1] instead of [0, 255]. More...
 
class  NveRenderTask
 Render task. More...
 
class  NveEffectInstance
 Effect instance. More...
 
class  NveCaption
 Captions are custom text superimposed on the video. You can add and adjust the caption position. After adding caption, you can also set styles, including font size, color, shadow, stroke, etc. More...
 
class  NveAnimatedSticker
 Animated sticker class.Animation sticker is a landscaping effect used in video editing to produce animated effects. Users can add and adjust various properties of the stickers through various APIs, such as position, size, display time, and so on. More...
 
class  NveCompoundCaption
 Compound caption. Compound captions are compound caption that is superimposed on the video, each compound caption may composed of several sub-captions. When editing a video, users can add and adjust the captions position. User can also set its properties such as font family, text color, etc. More...
 
class  NveVideoTransition
 There are multiple clips on the track. The transition is the transition effect from one video clip to another, and no video transitions can be added between clips with gaps. Currently it supports multiple video transitions including fade, turning, swap, stretch in, page curl, lens flare, star, dip to black, dip to white,push to right, push to top, upper left into.Each video transition can be set and retrieved via video track. The default transition is fade. More...
 
class  NveEffectContext
 Effect context Effect context is the entry to effect SDK framework, nveGetEffectContextInstance() used to get the unique effect context instance. More...
 
class  NveAssetPackageManager
 The asset package manager manages the asset packages in the video scene. During the development of SDK, the asset package manager uniformly installs, upgrades and uninstalls various stunt asset packages needed, including captions, animated stickers, etc. When installing, upgrading and uninstalling, there will be corresponding error prompt types in case of errors, so as to quickly locate and solve the errors. More...
 
class  NveARSceneManipulate
 ARScene manipulate. More...
 
class  NveARSceneRenderer
 ARScene builtin fx compound renderer By internally downloading and initializing face models, and managing the installation of asset packages, the logic of appling beauty, shape, and makeup is simplified. It also provides starting camera media stream, external input media stream, output media stream, and IndexedDB caching internally. Just configure parameters while initializing, and then set the asset packages' url or other parameters to get the results of beauty, shape, and makeup rendering conveniently. More...
 

Functions

function nveGetEffectContextInstance ()
 Get instance of effect context. More...
 
function nveSetModule (module)
 
function nveInitClasses ()
 
function nveSetFS (fs)
 

Variables

var Module = typeof Module !== 'undefined' ? Module : {}
 
var FS = typeof FS !== 'undefined' ? FS : {}
 
const NveCaptionTextAlignmentEnum
 Caption text alignment enum. More...
 
const NveCaptionTextBoundingTypeEnum
 Caption text bounding type enum. More...
 
const NveCaptionLetterSpacingTypeEnum
 Caption letter spacing type enum. More...
 
const NveRenderFlagEnum
 Render flag enum. More...
 
const NveAssetPackageTypeEnum
 Asset package type enum. More...
 
const NveAssetPackageStatusEnum
 Asset package status enum. More...
 
const NveHumanDetectionFeatureEnum
 The enum of human detection. More...
 
const NveHumanDetectionDataTypeEnum
 Data type enum of human detection. More...
 
const NveAssetPackageErrorEnum
 Asset package error enum. More...
 

Detailed Description

Doc of Effect SDK WEB APPLICATION.

Version
3.12.1

Function Documentation

◆ nveGetEffectContextInstance()

function nveGetEffectContextInstance ( )

Get instance of effect context.

Returns
{NveEffectContext} Instance of effect context

Variable Documentation

◆ NveAssetPackageErrorEnum

const NveAssetPackageErrorEnum
Initial value:
= Object.freeze({
"NoError" : 0,
"NameError" : 1,
"AlreadyInstalledError" : 2,
"WorkingInProgress" : 3,
"NotInstalledError" : 4,
"ImproperStatusError" : 5,
"DecompressionError" : 6,
"InvalidPackageError" : 7,
"AssetTypeError" : 8,
"PermissionError" : 9,
"MetaContentError" : 10,
"SdkVersionError" : 11,
"UpgradeVersionError" : 12,
"IOError" : 13,
"ResourceError" : 14})

Asset package error enum.

Note
NoError No error
NameError Name error
AlreadyInstalledError Already installed
WorkingInProgress Working in progress
NotInstalledError Not installed error
ImproperStatusError Improper status error
DecompressionError Decompression error
InvalidPackageError Invalid package error
AssetTypeError Asset type error
PermissionError Permission error
MetaContentError Meta content error
SdkVersionError Sdk version error
UpgradeVersionError Upgrade version error
IOError IO error
ResourceError Resource error

◆ NveAssetPackageStatusEnum

const NveAssetPackageStatusEnum
Initial value:
= Object.freeze({
"NotInstalled" : 0,
"Installing" : 1,
"Ready" : 2,
"Upgrading" : 3})

Asset package status enum.

Note
NotInstalled Not installed
Installing Installing
Ready Ready
Upgrading Upgrading

◆ NveAssetPackageTypeEnum

const NveAssetPackageTypeEnum
Initial value:
= Object.freeze({
"VideoFx" : 0,
"VideoTransition" : 1,
"CaptionStyle" : 2,
"AnimatedSticker" : 3,
"CaptureScene" : 5,
"ARScene" : 6,
"CompoundCaption" : 7,
"CaptionContext" : 8,
"CaptionRenderer" : 9,
"CaptionAnimation" : 10,
"CaptionInAnimation" : 11,
"CaptionOutAnimation" : 12,
"AvatarModel" : 14,
"AvatarMaterial" : 15,
"AnimatedStickerAnimation" : 16,
"AnimatedStickerInAnimation" : 17,
"AnimatedStickerOutAnimation" : 18,
"Makeup": 19,
"FaceMesh": 20,
"Warp": 21})

Asset package type enum.

Note
VideoFx Video Fx Type
VideoTransition Video Transition Type
CaptionStyle Caption Style Type
AnimatedSticker Animated Sticker Type
ARScene AR Scene Type
CompoundCaption Compound caption type
CaptionContext Modular caption context type
CaptionRenderer Modular caption renderer type
CaptionAnimation Modular caption animation type
CaptionInAnimation Modular caption in-animation type
CaptionOutAnimation Modular caption out-animation type
Template Template type
AvatarModel Avatar model type
AvatarMaterial Avatar material type
AnimatedStickerAnimation Animated sticker animation type
AnimatedStickerInAnimation Animated sticker in-animation type
AnimatedStickerOutAnimation Animated sticker out-animation type
Makeup Makeup type
FaceMesh Face mesh type
Warp Warp type
Project Project type

◆ NveCaptionLetterSpacingTypeEnum

const NveCaptionLetterSpacingTypeEnum
Initial value:
= Object.freeze({
Percentage: 0,
Absolute: 1,
})

Caption letter spacing type enum.

Note
Percentage Percentage
Absolute Absolute

◆ NveCaptionTextAlignmentEnum

const NveCaptionTextAlignmentEnum
Initial value:
= Object.freeze({
Left: 0,
Center: 1,
Right: 2,
Top: 3,
Bottom: 4,
VCenter: 5,
})

Caption text alignment enum.

Note
Left Left alignment
Center Horizontal center alignment
Right Right alignment
Top Top alignment
Bottom Bottom alignment
VCenter Vertical center alignment

◆ NveCaptionTextBoundingTypeEnum

const NveCaptionTextBoundingTypeEnum
Initial value:
= Object.freeze({
Text: 0,
TextFrame: 1,
Frame: 2,
TextOriginFrame: 3,
})

Caption text bounding type enum.

Note
Text The actual text bounding
TextFrame Text frame bounding
Frame The whole bounding including decoration
TextOriginFrame The origin text frame bounding

◆ NveHumanDetectionDataTypeEnum

const NveHumanDetectionDataTypeEnum
Initial value:
= Object.freeze({
"FakeFace": 0,
"Makeup": 1,
"SkinColor": 2,
"PE106": 3,
"PE240": 4,
"CustomAvatar": 5,
"Makeup2": 6})

Data type enum of human detection.

Note
FakeFace Fake face
Makeup Makeup
SkinColor Skin color
PE106 PE106
PE240 PE240
CustomAvatar Custom avatar
Makeup2 Makeup2

◆ NveHumanDetectionFeatureEnum

const NveHumanDetectionFeatureEnum
Initial value:
= Object.freeze({
FaceLandmark: 0x00000001,
FaceAction: 0x00000002,
AvatarExpression: 0x00000004,
VideoMode: 0x00000008,
ImageMode: 0x00000010,
SemiImageMode: 0x00008000,
MultiThread: 0x00000020,
SingleThread: 0x00000040,
Extra: 0x00000080,
SegmentationBackground: 0x00000100,
HandLandmark: 0x00000200,
HandAction: 0x00000400,
HandBone: 0x00000800,
EyeballLandmark: 0x00001000,
MultiDetect: 0x00002000,
SegmentationSky: 0x00004000,
SegmentationHalfBody: 0x00010000,
FaceAttr: 0x00020000,
FaceAttrShape: 0x00040000
})

The enum of human detection.

Note
0x00000001 Landmarks on human face
0x00000002 Actions of human face
0x00000004 Avatar Expressions of human face
0x00000008 Video detection mode
0x00000010 Image detection mode
0x00008000 Semi-image detection mode
0x00000020 Multi thread detection
0x00000040 Single thread detection
0x00000080 Extra features of human face
0x00000100 Background segmentation
0x00000200 Hand landmarks
0x00000400 Hand actions
0x00000800 Bone landmarks of hand
0x00001000 Eyeball landmarks
0x00002000 Multiple detect, say multiple rois detection
0x00004000 Sky segmentation
0x00010000 Half body segmentation
0x00020000 Base face attributes
0x00040000 Face shape attribute

◆ NveRenderFlagEnum

const NveRenderFlagEnum
Initial value:
= Object.freeze({
"DontDropFrame" : 1,
"OutputImageBitmap" : 2})

Render flag enum.

Note
DontDropFrame Don't drop frame
OutputImageBitmap Output ImageBitmap