MeiCam SDK For Web  3.12.1
Public Member Functions | List of all members
NvsAssetPackageManager Class Reference

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...

Public Member Functions

 constructor ()
 
 setInternalObject (obj)
 Set internal object. More...
 
 getInternalObject ()
 Get internal object. More...
 
 installAssetPackage (assetPackageFilePath, licenseFilePath, type)
 Install asset package. After calling this funtion, onFinishAssetPackageInstallation will be received with the result of installation. onFinishAssetPackageInstallation contains assetPackageId, assetPackageFilePath, assetPackageType and error parameters. assetPackageId is the asset package id of the finished installation, assetPackageFilePath is the asset package file path of the finished installation, assetPackageType is the asset package type of the finished installation, error is the error of the finished installation, see NvsAssetPackageErrorEnum. More...
 
 upgradeAssetPackage (assetPackageFilePath, licenseFilePath, type)
 Upgrade asset package. After calling this funtion, onFinishAssetPackageUpgrading will be received with the result of upgrading. onFinishAssetPackageUpgrading contains assetPackageId, assetPackageFilePath, assetPackageType and error parameters. assetPackageId is the asset package id of the finished upgrading, assetPackageFilePath is the asset package file path of the finished upgrading, assetPackageType is the asset package type of the finished upgrading, error is the error of the finished upgrading, see NvsAssetPackageErrorEnum. More...
 
 uninstallAssetPackage (assetPackageId, type)
 Uninstall asset package. More...
 
 getAssetPackageStatus (assetPackageId, type)
 Get the status of the asset package. More...
 
 getAssetPackageVersion (assetPackageId, type)
 Get the version of the asset package. More...
 
 getAssetPackageContentType (assetPackageId, type)
 Get the content type of the asset package. More...
 
 isParticleFX (uuidString)
 Determines whether it is a particle effect. More...
 
 getVideoFxAssetPackageDescription (uuidString)
 Get the description of the VideoFx package. More...
 
 getTemplateFootages (uuidString)
 Gets the footage description list of the Template asset. More...
 
 getTemplateCaptions (uuidString)
 Gets the caption description list of the Template asset. More...
 
 getTemplateCompoundCaptions (uuidString)
 Gets the compound caption description list of the Template asset. More...
 
 getTemplatePackageDirPath (uuidString)
 get template package path More...
 
 getTemplateCurrentAspectRatio (uuidString)
 Gets the aspect ratio which is template using. More...
 
 getTemplateDefaultAspectRatio (uuidString)
 Gets the default aspect ratio of template. More...
 
 writeTemplateXml (timeline, aspectRatio, uuidString)
 Write template xml. More...
 
 generateTemplatePackage (innerAssetDir, uuidString, outputPath)
 Generate template asset package.Returns suc or not. More...
 
 writeProjectXml (timeline, aspectRatio, uuidString)
 Write project xml. More...
 
 generateProjectPackage (innerAssetDir, uuidString, outputPath)
 Generate project asset package. More...
 
 setTemplateCustomResourceDir (uuidString, dir)
 Set templates/project custom resource folders. More...
 
 getAssetPackageRootDir ()
 Get resource package root directory. More...
 
 changeTemplateAspectRatio (uuidString, aspectRatio)
 Change aspect ratio of template. More...
 
 getAssetPackageMinSdkVersion (assetPackageId, type)
 Get the minimum Sdk version supported of asset package. More...
 
 getExpValueList (assetPackageId, type)
 Get all expression value list of asset package. More...
 
 getTranslationMap (assetPackageId, type)
 Get translation map of asset package. More...
 

Detailed Description

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.

Member Function Documentation

◆ changeTemplateAspectRatio()

NvsAssetPackageManager::changeTemplateAspectRatio (   uuidString,
  aspectRatio 
)
inline

Change aspect ratio of template.

Parameters
{String}uuidString Special effect uuid
{Number}aspectRatio The aspect ratio
Returns
{Boolean} Returns suc or not

◆ constructor()

NvsAssetPackageManager::constructor ( )
inline

@constructor

◆ generateProjectPackage()

NvsAssetPackageManager::generateProjectPackage (   innerAssetDir,
  uuidString,
  outputPath 
)
inline

Generate project asset package.

Parameters
{String}innerAssetDir Path of internal assets of template
{String}uuidString project resource package ID
{String}outputPath Output path of project asset package
Returns
{Boolean} Returns suc or not

◆ generateTemplatePackage()

NvsAssetPackageManager::generateTemplatePackage (   innerAssetDir,
  uuidString,
  outputPath 
)
inline

Generate template asset package.Returns suc or not.

Parameters
{String}innerAssetDir Path of internal assets of template
{String}uuidString Template resource package ID
{String}outputPath Output path of template asset package
Returns
{Boolean} Generate template asset package.

◆ getAssetPackageContentType()

NvsAssetPackageManager::getAssetPackageContentType (   assetPackageId,
  type 
)
inline

Get the content type of the asset package.

Parameters
{String}assetPackageId Asset package id
{Number}type Asset package type, see NvsAssetPackageTypeEnum.
Returns
{String} The content type of the asset package.

◆ getAssetPackageMinSdkVersion()

NvsAssetPackageManager::getAssetPackageMinSdkVersion (   assetPackageId,
  type 
)
inline

Get the minimum Sdk version supported of asset package.

Parameters
{String}assetPackageId Package ID
{Number}type The type of package
Returns
{String} The minimum Sdk version

◆ getAssetPackageRootDir()

NvsAssetPackageManager::getAssetPackageRootDir ( )
inline

Get resource package root directory.

Returns
{String}

◆ getAssetPackageStatus()

NvsAssetPackageManager::getAssetPackageStatus (   assetPackageId,
  type 
)
inline

Get the status of the asset package.

Parameters
{String}assetPackageId Asset package id
{Number}type Asset package type, see NvsAssetPackageTypeEnum.
Returns
{Number} The status of the asset package, see NvsAssetPackageStatusEnum.

◆ getAssetPackageVersion()

NvsAssetPackageManager::getAssetPackageVersion (   assetPackageId,
  type 
)
inline

Get the version of the asset package.

Parameters
{String}assetPackageId Asset package id
{Number}type Asset package type, see NvsAssetPackageTypeEnum.
Returns
{Number} The version of the asset package.

◆ getExpValueList()

NvsAssetPackageManager::getExpValueList (   assetPackageId,
  type 
)
inline

Get all expression value list of asset package.

Parameters
{String}assetPackageId Package ID
{Number}type The type of package
Returns
{NvsVectorVal<NvsParamInfoObject>} Expression value list

◆ getInternalObject()

NvsAssetPackageManager::getInternalObject ( )
inline

Get internal object.

Returns
{Object}

◆ getTemplateCaptions()

NvsAssetPackageManager::getTemplateCaptions (   uuidString)
inline

Gets the caption description list of the Template asset.

Parameters
{String}uuidString Special effect uuid
Returns
{NvsVectorVal<NvsTemplateCaptionDesc>} Returns a ArrayList object, which is a caption description list.

◆ getTemplateCompoundCaptions()

NvsAssetPackageManager::getTemplateCompoundCaptions (   uuidString)
inline

Gets the compound caption description list of the Template asset.

Parameters
{String}uuidString Special effect uuid
Returns
{NvsVectorVal<NvsTemplateCompoundCaptionItemDesc>} Returns a ArrayList object, which is a compound caption description list.

◆ getTemplateCurrentAspectRatio()

NvsAssetPackageManager::getTemplateCurrentAspectRatio (   uuidString)
inline

Gets the aspect ratio which is template using.

Parameters
{String}uuidString Special effect uuid
Returns
{Number} Returns aspect ratio which is template using.

◆ getTemplateDefaultAspectRatio()

NvsAssetPackageManager::getTemplateDefaultAspectRatio (   uuidString)
inline

Gets the default aspect ratio of template.

Parameters
{String}uuidString Special effect uuid
Returns
{Number} Returns aspect ratio which is template using.

◆ getTemplateFootages()

NvsAssetPackageManager::getTemplateFootages (   uuidString)
inline

Gets the footage description list of the Template asset.

Parameters
{String}uuidString Special effect uuid
Returns
{NvsVectorVal<NvsTemplateFootageDesc>} Returns a ArrayList object, which is a footage description list.

◆ getTemplatePackageDirPath()

NvsAssetPackageManager::getTemplatePackageDirPath (   uuidString)
inline

get template package path

Parameters
{String}uuidString Special effect uuid
Returns
{String} path of template asset package

◆ getTranslationMap()

NvsAssetPackageManager::getTranslationMap (   assetPackageId,
  type 
)
inline

Get translation map of asset package.

Parameters
{String}assetPackageId Package ID
{Number}type The type of package
Returns
{NvsVectorVal<NvsTranslationInfo>} Translation map

◆ getVideoFxAssetPackageDescription()

NvsAssetPackageManager::getVideoFxAssetPackageDescription (   uuidString)
inline

Get the description of the VideoFx package.

Parameters
{String}uuidString Asset package id
Returns
{String} Description string

◆ installAssetPackage()

NvsAssetPackageManager::installAssetPackage (   assetPackageFilePath,
  licenseFilePath,
  type 
)
inline

Install asset package. After calling this funtion, onFinishAssetPackageInstallation will be received with the result of installation. onFinishAssetPackageInstallation contains assetPackageId, assetPackageFilePath, assetPackageType and error parameters. assetPackageId is the asset package id of the finished installation, assetPackageFilePath is the asset package file path of the finished installation, assetPackageType is the asset package type of the finished installation, error is the error of the finished installation, see NvsAssetPackageErrorEnum.

Parameters
{String}assetPackageFilePath File path of the asset package to be installed
{String}licenseFilePath License file path of the asset package to be installed
{Number}type The type of asset package to be installed, see NvsAssetPackageTypeEnum.

◆ isParticleFX()

NvsAssetPackageManager::isParticleFX (   uuidString)
inline

Determines whether it is a particle effect.

Parameters
{String}uuidString Particle effect uuid
Returns
{Boolean} Returns a boolean object indicating whether it is a particle effect.

◆ setInternalObject()

NvsAssetPackageManager::setInternalObject (   obj)
inline

Set internal object.

Parameters
{Object}obj Internal object

◆ setTemplateCustomResourceDir()

NvsAssetPackageManager::setTemplateCustomResourceDir (   uuidString,
  dir 
)
inline

Set templates/project custom resource folders.

Parameters
{String}uuidString Path of internal assets of template
{String}dir project resource package ID
Returns
{Boolean} Returns suc or not

◆ uninstallAssetPackage()

NvsAssetPackageManager::uninstallAssetPackage (   assetPackageId,
  type 
)
inline

Uninstall asset package.

Parameters
{String}assetPackageId Id of asset package to be uninstalled
{Number}type The type of asset package to be uninstalled, see NvsAssetPackageTypeEnum.
Returns
{Number} The result of uninstallation, see NvsAssetPackageTypeEnum.

◆ upgradeAssetPackage()

NvsAssetPackageManager::upgradeAssetPackage (   assetPackageFilePath,
  licenseFilePath,
  type 
)
inline

Upgrade asset package. After calling this funtion, onFinishAssetPackageUpgrading will be received with the result of upgrading. onFinishAssetPackageUpgrading contains assetPackageId, assetPackageFilePath, assetPackageType and error parameters. assetPackageId is the asset package id of the finished upgrading, assetPackageFilePath is the asset package file path of the finished upgrading, assetPackageType is the asset package type of the finished upgrading, error is the error of the finished upgrading, see NvsAssetPackageErrorEnum.

Parameters
{String}assetPackageFilePath File path of the asset package to upgrade
{String}licenseFilePath License file path of the asset package to upgrade
{Number}type The type of asset package to upgrade, see NvsAssetPackageTypeEnum.

◆ writeProjectXml()

NvsAssetPackageManager::writeProjectXml (   timeline,
  aspectRatio,
  uuidString 
)
inline

Write project xml.

Parameters
{NvsTimeline}timeline The timeline
{Number}aspectRatio The aspect ratio
{String}uuidString Special effect uuid
Returns
{Boolean}

◆ writeTemplateXml()

NvsAssetPackageManager::writeTemplateXml (   timeline,
  aspectRatio,
  uuidString 
)
inline

Write template xml.

Parameters
{NvsTimeline}timeline The timeline
{Number}aspectRatio The aspect ratio
{String}uuidString Special effect uuid
Returns
{Boolean}

The documentation for this class was generated from the following file: