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

Timeline class: edit the timeline entity of the scene. The timeline is composed of tracks and can be regarded as a collection of a series of audio and video tracks. Multiple video tracks and audio tracks can be added or removed on the timeline. Multiple tracks are superimposed and synthesized with each other. When editing a video, you can also add timeline subtitles, themes and corresponding animation stickers as needed to make a beautiful video. In addition, the added material resource package (theme package, animation sticker package, subtitle style package, timeline special effect package, etc.) must be installed first. After successful installation, the packageid can be used, while the built-in timeline special effect (builtin) only needs to obtain the special effect name. More...

Inheritance diagram for NvsTimeline:
NvsProjObj

Public Member Functions

 constructor ()
 
 getVideoRes ()
 Gets video's resolution (image's width, height and aspect ratio). More...
 
 getAudioRes ()
 Gets audio's resolution (sampling rate, sampling format and number of channels). More...
 
 getDuration ()
 Gets timeline's duration. More...
 
 appendVideoTrack ()
 Appends video track. More...
 
 appendAudioTrack ()
 Appends audio track. More...
 
 insertVideoTrack (insertPoint)
 Insert video track. More...
 
 insertAudioTrack (insertPoint)
 Appends audio track. More...
 
 removeVideoTrack (trackIndex)
 remove video track More...
 
 removeAudioTrack (trackIndex)
 remove Remove audio track. More...
 
 videoTrackCount ()
 Get count of video track. More...
 
 audioTrackCount ()
 Get count of audio track. More...
 
 getVideoTrackByIndex (trackIndex)
 Gets video track with track index. More...
 
 getAudioTrackByIndex (trackIndex)
 get audio track according to index More...
 
 changeVideoSize (videoWidth, videoHeight)
 Change the timeline video resolution. Remark:If timeline is linked to a surfaceTexture, the surfaceTexture must be detached first, and then timeline video resolution can be changed. After timeline resolution is changed, the SurfaceTexture can be re-attached to timeline. More...
 
 changeVideoSize2 (videoWidth, videoHeight)
 Change video size. More...
 
 getFirstCaption ()
 Get the first caption on the timeline. More...
 
 getLastCaption ()
 Get the last caption on the timeline. More...
 
 getPrevCaption (caption)
 Get the previous caption of the current caption on the timeline. More...
 
 getNextCaption (caption)
 Get the next caption of the current caption on the timeline. More...
 
 getCaptionsByTimelinePosition (timelinePos)
 Get a list of captions based on the position on the timeline. More...
 
 addCaption (captionText, inPoint, duration, captionStylePackageId, isPanoramic)
 Add a caption on the timeline. More...
 
 addModularCaption (captionText, inPoint, duration)
 add modular caption More...
 
 removeCaption (caption)
 Remove the caption on the timeline. More...
 
 getFirstCompoundCaption ()
 Get the first compound caption on the timeline. More...
 
 getLastCompoundCaption ()
 Get the last compound caption on the timeline. More...
 
 getPrevCompoundCaption (caption)
 Get the previous compound caption of the current compound caption on the timeline. More...
 
 getNextCompoundCaption (caption)
 Get the next compound caption of the current caption on the timeline. More...
 
 getCompoundCaptionsByTimelinePosition (timelinePos)
 Get a list of compound captions based on the position on the timeline. More...
 
 addCompoundCaption (inPoint, duration, compoundCaptionPackageId)
 add compound caption More...
 
 removeCompoundCaption (caption)
 Remove compound caption from the timeline. More...
 
 getFirstAnimatedSticker ()
 Get the first animated sticker on the timeline. More...
 
 getLastAnimatedSticker ()
 Get the last animated sticker on the timeline. More...
 
 getPrevAnimatedSticker (animatedSticker)
 Get the previous animated sticker of the current animated sticker of the timeline. More...
 
 getNextAnimatedSticker (animatedSticker)
 Get the next animated sticker of the current animated sticker of the timeline. More...
 
 getAnimatedStickersByTimelinePosition (timelinePos)
 Get an animated sticker list based on the position on the timeline. More...
 
 addAnimatedSticker (inPoint, duration, animatedStickerPackageId, isPanoramic, isCustom, customImagePath)
 add animated sticker More...
 
 removeAnimatedSticker (animatedSticker)
 Remove an animated sticker on the timeline. More...
 
 getFirstTimelineVideoFx ()
 Get the first timeline video effect on the timeline. More...
 
 getLastTimelineVideoFx ()
 Get the last timeline video effect on the timeline. More...
 
 getPrevTimelineVideoFx (timelineVideoFx)
 Get the previous timeline video effect of a timeline video effect on the timeline. More...
 
 getNextTimelineVideoFx (timelineVideoFx)
 Get the next timeline video effect of a timeline video effect on the timeline. More...
 
 getTimelineVideoFxByTimelinePosition (timelinePos)
 Get a list of timeline video effects based on position on the timeline. More...
 
 addBuiltinTimelineVideoFx (inPoint, duration, videoFxName)
 Add a built-in timeline video effect on the timeline. More...
 
 addPackagedTimelineVideoFx (inPoint, duration, videoFxPackageId)
 Add a timeline video effect in the form of a resource package on the timeline. More...
 
 removeTimelineVideoFx (timelineVideoFx)
 remove Remove a timeline video effect from the timeline. More...
 
 getCurrentThemeId ()
 Get the id of the current theme. More...
 
 applyTheme (themeId)
 Apply a theme to the current timeline (the theme is relative to the entire timeline). For themes, there may be a title or a trailer, or both of them, or none. When applying a theme with a title or a trailer or both of them are treated as a clip, resulting in an increase in the count of clips. When using this interface, be careful to determine the count of clips. More...
 
 applyThemeTemplate (templateId)
 Apply adaptive duration template. More...
 
 removeCurrentTheme ()
 Remove current theme. More...
 
 setThemeTitleCaptionText (text)
 Set the caption text for theme title. More...
 
 setThemeTrailerCaptionText (text)
 Set the caption text for theme trailer. More...
 
 setThemeMusicVolumeGain (leftVolumeGain, rightVolumeGain)
 Set the volume value for theme music. More...
 
 getThemeMusicVolumeGain ()
 Get the volume value for theme music. More...
 
 setPlaybackRateControl (playbackRateControlRegions)
 set playback rate control More...
 
 addWatermark (filePath, displayWidth, displayHeight, opacity, position, marginX, marginY)
 Add watermark. More...
 
 addWatermark2 (sceneWidth, sceneHeight, imageName, imgWidth, imgHeight, tx, ty, dirPath, opacity)
 add watermark More...
 
 deleteWatermark ()
 Delete watermark which has added. More...
 
 setWatermarkOpacity (opacity)
 Set watermark opacity. More...
 
 getWatermarkInfo ()
 get watermark information More...
 
 setMaxAudioStreamSupportedOnVideoTrack (maxStream)
 set max audio stream of video track supported More...
 
 getMaxAudioStreamSupportedOnVideoTrack ()
 get max audio stream of video track supported More...
 
 enableRenderOrderByZValue (enable)
 Turn on use the Z value as the render order. Note: there are timeline caption, compound caption, module captions, animation stickers and timeline filters If the Z value in the same type is the same, it is the same as the sorting method in which the property is not enabled If the Z values of different types are the same, the order is: timeline Filter > Animation sticker > timeline caption (including module caption) > compound caption. More...
 
 isRenderOrderByZValueEnabled ()
 Whether to turn on use Z value as the rendering order. More...
 
 setVolumeGain (leftVolumeGain, rightVolumeGain)
 Sets the volume. More...
 
 getVolumeGain ()
 Get the volume information. More...
 
 getCreationFlags ()
 Get the creation flags of timeline. More...
 
 getCaptionsBoundingVerticesRecursively (boundingType, timelinePosition)
 Get the bounding vertices of all captions at timeline position. More...
 
 getVideoClipBoundingVerticesRecursively (timelinePosition)
 Get the bounding vertices of all video clips at timeline position. More...
 
- Public Member Functions inherited from NvsProjObj
 constructor ()
 
 setInternalObject (obj)
 set internal object More...
 
 getInternalObject ()
 get internal object More...
 
 setTemplateAttachment (key, value)
 Adds additional template data to the NvsObject object to identify the NvsObject template object. More...
 
 getTemplateAttachment (key)
 Gets an template attachment to NvsObject. More...
 

Detailed Description

Timeline class: edit the timeline entity of the scene. The timeline is composed of tracks and can be regarded as a collection of a series of audio and video tracks. Multiple video tracks and audio tracks can be added or removed on the timeline. Multiple tracks are superimposed and synthesized with each other. When editing a video, you can also add timeline subtitles, themes and corresponding animation stickers as needed to make a beautiful video. In addition, the added material resource package (theme package, animation sticker package, subtitle style package, timeline special effect package, etc.) must be installed first. After successful installation, the packageid can be used, while the built-in timeline special effect (builtin) only needs to obtain the special effect name.

See also
NvsProjObj

Member Function Documentation

◆ addAnimatedSticker()

NvsTimeline::addAnimatedSticker (   inPoint,
  duration,
  animatedStickerPackageId,
  isPanoramic,
  isCustom,
  customImagePath 
)
inline

add animated sticker

Parameters
{Number}inPoint The in point of the animated sticker on the timeline (in microseconds)
{Number}duration The duration of the animation sticker which displayed (in microseconds)
{String}animatedStickerPackageId Animated sticker packageId
{Boolean}isPanoramic Panoramic or not
{Boolean}isCustom Customize or not
{String}customImagePath Custome image path
Returns
{NvsTimelineAnimatedSticker} Return the NvsTimelineAnimatedSticker object. It will return null in the following situations:
  1. No animated sticker function authorization;
  2. The animatedStickerPackageId is empty or null;
  3. The animatedSticker has not install successed;
  4. If inPoint is less than 0 or greater than or equal to the current timeline duration, or duration is not greater than 0.

◆ addBuiltinTimelineVideoFx()

NvsTimeline::addBuiltinTimelineVideoFx (   inPoint,
  duration,
  videoFxName 
)
inline

Add a built-in timeline video effect on the timeline.

Parameters
{Number}inPoint The in point of the timeline video effect on the timeline (in microseconds)
{Number}duration Duration of the timeline video effect which displayed (in microseconds)
{String}videoFxName The video effect name
Returns
{NvsTimelineVideoFx} Return the NvsTimelineVideoFx object It will return null in the following situations:
  1. videoFxName is empty or null;
  2. videoFxName is not built in fx;
  3. If inPoint is less than 0 or greater than or equal to the current timeline duration, or duration is not greater than 0.

◆ addCaption()

NvsTimeline::addCaption (   captionText,
  inPoint,
  duration,
  captionStylePackageId,
  isPanoramic 
)
inline

Add a caption on the timeline.

Parameters
{String}captionText caption text
{Number}inPoint in point
{Number}duration duration
{String}captionStylePackageId caption style package id
{Boolean}isPanoramic panoramic or not
Returns
{NvsTimelineCaption} Returns the NvsTimelineCaption object. It will return null in the following situations:
  1. No caption function authorization;
  2. If inPoint is less than 0 or greater than or equal to the current timeline duration, or duration is not greater than 0.

◆ addCompoundCaption()

NvsTimeline::addCompoundCaption (   inPoint,
  duration,
  compoundCaptionPackageId 
)
inline

add compound caption

Parameters
{Number}inPoint in point
{Number}duration duration
{String}compoundCaptionPackageId compound caption package id
Returns
{NvsTimelineCompoundCaption}

◆ addModularCaption()

NvsTimeline::addModularCaption (   captionText,
  inPoint,
  duration 
)
inline

add modular caption

Parameters
{String}captionText caption text
{Number}inPoint in point
{Number}duration duration
Returns
{NvsTimelineCaption} Returns the NvsTimelineCaption object. It will return null in the following situations:
  1. No caption function authorization;
  2. If inPoint is less than 0 or greater than or equal to the current timeline duration, or duration is not greater than 0.

◆ addPackagedTimelineVideoFx()

NvsTimeline::addPackagedTimelineVideoFx (   inPoint,
  duration,
  videoFxPackageId 
)
inline

Add a timeline video effect in the form of a resource package on the timeline.

Parameters
{Number}inPoint The in point of the timeline video effect on the timeline (in microseconds)
{Number}duration Duration of the timeline video effect which displayed (in microseconds)
{String}videoFxPackageId The Id of resource package
Returns
{NvsTimelineVideoFx} Return the NvsTimelineVideoFx object It will return null in the following situations:
  1. No timeline video effect function authorization, if this is particle effect, may have no particle effect function authorization;
  2. The videoFxPackageId is empty or null;
  3. The videoFxPackage has not install successed;
  4. If inPoint is less than 0 or greater than or equal to the current timeline duration, or duration is not greater than 0.

◆ addWatermark()

NvsTimeline::addWatermark (   filePath,
  displayWidth,
  displayHeight,
  opacity,
  position,
  marginX,
  marginY 
)
inline

Add watermark.

Parameters
{String}filePath The path of the watermark file must be a .PNG or .JPG or .CAF file.
{Number}displayWidth The width of the watermark displayed in the timeline. If 0, the width of the image file is used.
{Number}displayHeight The height of the watermark displayed in the timeline. If 0, the height of the image file is used.
{Number}opacity Watermark opacity, the range is [0,1]
{Number}position The position of the watermark
{Number}marginX The margin of the watermark in the horizontal direction
{Number}marginY The margin of the watermark in the vertical direction
Returns
{}

◆ addWatermark2()

NvsTimeline::addWatermark2 (   sceneWidth,
  sceneHeight,
  imageName,
  imgWidth,
  imgHeight,
  tx,
  ty,
  dirPath,
  opacity 
)
inline

add watermark

Parameters
{Number}sceneWidth
{Number}sceneHeight
{String}imageName
{Number}imgWidth
{Number}imgHeight
{Number}tx
{Number}ty
{String}dirPath
{Number}opacity
Returns
{}

◆ appendAudioTrack()

NvsTimeline::appendAudioTrack ( )
inline

Appends audio track.

Returns
{NvsAudioTrack} Returns the appended NvsAudioTrack object. When adding more than one audio track, null may be returned due to multi-musictrack authorization.This interface will cause the streaming engine state to jump to the state of stopping engine.

◆ appendVideoTrack()

NvsTimeline::appendVideoTrack ( )
inline

Appends video track.

Returns
{NvsVideoTrack} Returns the appended NvsVideoTrack object. When adding more than one video track, null may be returned due to multi-videotrack authorization.This interface will cause the streaming engine state to jump to the state of stopping engine.

◆ applyTheme()

NvsTimeline::applyTheme (   themeId)
inline

Apply a theme to the current timeline (the theme is relative to the entire timeline). For themes, there may be a title or a trailer, or both of them, or none. When applying a theme with a title or a trailer or both of them are treated as a clip, resulting in an increase in the count of clips. When using this interface, be careful to determine the count of clips.

Parameters
{String}themeId Id of theme package(if themeId if empty string or null, will remove current theme)
Returns
{Boolean} Determine if the theme is applied successfully. If YES is returned, the theme is used successfully, and NO means the oppsite. It will return NO in the following situations: 1.No theme function authorization; 2.The theme package install failed; 3.No video track on timeline.

◆ applyThemeTemplate()

NvsTimeline::applyThemeTemplate (   templateId)
inline

Apply adaptive duration template.

Parameters
{String}templateId uuid
Returns
{Boolean} Apply adaptive duration template.

◆ audioTrackCount()

NvsTimeline::audioTrackCount ( )
inline

Get count of audio track.

Returns
{Number} Returns count of audio track.

◆ changeVideoSize()

NvsTimeline::changeVideoSize (   videoWidth,
  videoHeight 
)
inline

Change the timeline video resolution. Remark:If timeline is linked to a surfaceTexture, the surfaceTexture must be detached first, and then timeline video resolution can be changed. After timeline resolution is changed, the SurfaceTexture can be re-attached to timeline.

Parameters
{Number}videoWidth New video width(the imported image's width has to be a multiple of 4)
{Number}videoHeight New video height(the imported image's height has to be a multiple of 2)
Returns
{Boolean} Returns YES means it changes successfully, NO means it fails.If the passed width or height is less than 0 or the width is not a multiple of 4 and the height is not a multiple of 2, return false.

◆ changeVideoSize2()

NvsTimeline::changeVideoSize2 (   videoWidth,
  videoHeight 
)
inline

Change video size.

Parameters
{Number}videoWidth New video width(the imported image's width has to be a multiple of 4)
{Number}videoHeight New video height(the imported image's height has to be a multiple of 2)
Returns
{Boolean} Returns YES means it changes successfully, NO means it fails.If the passed width or height is less than 0 or the width is not a multiple of 4 and the height is not a multiple of 2, return false.

◆ constructor()

NvsTimeline::constructor ( )
inline

@constructor

◆ deleteWatermark()

NvsTimeline::deleteWatermark ( )
inline

Delete watermark which has added.

Returns
{}

◆ enableRenderOrderByZValue()

NvsTimeline::enableRenderOrderByZValue (   enable)
inline

Turn on use the Z value as the render order. Note: there are timeline caption, compound caption, module captions, animation stickers and timeline filters If the Z value in the same type is the same, it is the same as the sorting method in which the property is not enabled If the Z values of different types are the same, the order is: timeline Filter > Animation sticker > timeline caption (including module caption) > compound caption.

Parameters
{Boolean}enable Enable or not
Returns
{}

◆ getAnimatedStickersByTimelinePosition()

NvsTimeline::getAnimatedStickersByTimelinePosition (   timelinePos)
inline

Get an animated sticker list based on the position on the timeline.

Parameters
{Number}timelinePos Position on the timeline (in microseconds)
Returns
{NvsVectorVal<NvsTimelineAnimatedSticker>} Returns a list which holding the current position animated sticker object The sorting rules for the obtained animated sticker list are as follows: 1.When adding, the in points are different,animated stickers are arranged in the order of the in points; 2.When adding, the in points are the same, they are arranged in the order in which the animation stickers are added.

◆ getAudioRes()

NvsTimeline::getAudioRes ( )
inline

Gets audio's resolution (sampling rate, sampling format and number of channels).

Returns
{NvsAudioResolution} Returns the NvsAudioResolution object.

◆ getAudioTrackByIndex()

NvsTimeline::getAudioTrackByIndex (   trackIndex)
inline

get audio track according to index

Parameters
{Number}trackIndex track index
Returns
{NvsAudioTrack} Gets audio track with track index.Returns the NvsAudioTrack object.If trackIndex is less than 0 or greater than or equal to the current track number, return null.

◆ getCaptionsBoundingVerticesRecursively()

NvsTimeline::getCaptionsBoundingVerticesRecursively (   boundingType,
  timelinePosition 
)
inline

Get the bounding vertices of all captions at timeline position.

Parameters
{NvsCaptionTextBoundingTypeEnum}boundingType Bounding type
{Number}timelinePosition Timeline position
Returns
{NvsVectorVal<NvsCaptionBoundingVerticesInfo>} A std::vector of NvsCaptionBoundingVerticesInfo

◆ getCaptionsByTimelinePosition()

NvsTimeline::getCaptionsByTimelinePosition (   timelinePos)
inline

Get a list of captions based on the position on the timeline.

Parameters
{Number}timelinePos The position on the timeline(in micro-second)
Returns
{NvsVectorVal<NvsTimelineCaption>} Returns a list of arrays of captions at the current position. The sorting rules for the obtained captions list are as follows: 1.When adding, the in points are different, and captions are arranged in the order of the in points; 2.When adding, the in points are the same, and captions are arranged in the order of adding captions.

◆ getCompoundCaptionsByTimelinePosition()

NvsTimeline::getCompoundCaptionsByTimelinePosition (   timelinePos)
inline

Get a list of compound captions based on the position on the timeline.

Parameters
{Number}timelinePos The position on the timeline(in micro-second)
Returns
{NvsVectorVal<NvsTimelineCompoundCaption>} Returns a list of compound captions at the current position。 The sorting rules for the obtained captions list are as follows:
  1. If the in points are different, captions are sorted in the order of the in points;
  2. If the in points are the same, and captions are sorted in the order of compound caption added.

◆ getCreationFlags()

NvsTimeline::getCreationFlags ( )
inline

Get the creation flags of timeline.

Returns
{Number} Returns flags.

◆ getCurrentThemeId()

NvsTimeline::getCurrentThemeId ( )
inline

Get the id of the current theme.

Returns
{String} Current theme id, if no theme,returns empty string.

◆ getDuration()

NvsTimeline::getDuration ( )
inline

Gets timeline's duration.

Returns
{Number} Returns timeline's duration (in microseconds).

◆ getFirstAnimatedSticker()

NvsTimeline::getFirstAnimatedSticker ( )
inline

Get the first animated sticker on the timeline.

Returns
{NvsTimelineAnimatedSticker} Return the acquired NvsTimelineAnimatedSticker object.

◆ getFirstCaption()

NvsTimeline::getFirstCaption ( )
inline

Get the first caption on the timeline.

Returns
{NvsTimelineCaption} Returns the NvsTimelineCaption object.

◆ getFirstCompoundCaption()

NvsTimeline::getFirstCompoundCaption ( )
inline

Get the first compound caption on the timeline.

Returns
{NvsTimelineCompoundCaption} Returns the compound caption object.

◆ getFirstTimelineVideoFx()

NvsTimeline::getFirstTimelineVideoFx ( )
inline

Get the first timeline video effect on the timeline.

Returns
{NvsTimelineVideoFx} Returns the acquired NvsTimelineVideoFx object.

◆ getLastAnimatedSticker()

NvsTimeline::getLastAnimatedSticker ( )
inline

Get the last animated sticker on the timeline.

Returns
{NvsTimelineAnimatedSticker} Return the acquired NvsTimelineAnimatedSticker object.

◆ getLastCaption()

NvsTimeline::getLastCaption ( )
inline

Get the last caption on the timeline.

Returns
{NvsTimelineCaption} Returns the NvsTimelineCaption object.

◆ getLastCompoundCaption()

NvsTimeline::getLastCompoundCaption ( )
inline

Get the last compound caption on the timeline.

Returns
{NvsTimelineCompoundCaption} Returns the compound caption object.

◆ getLastTimelineVideoFx()

NvsTimeline::getLastTimelineVideoFx ( )
inline

Get the last timeline video effect on the timeline.

Returns
{NvsTimelineVideoFx} Returns the acquired NvsTimelineVideoFx object.

◆ getMaxAudioStreamSupportedOnVideoTrack()

NvsTimeline::getMaxAudioStreamSupportedOnVideoTrack ( )
inline

get max audio stream of video track supported

Returns
{Number}

◆ getNextAnimatedSticker()

NvsTimeline::getNextAnimatedSticker (   animatedSticker)
inline

Get the next animated sticker of the current animated sticker of the timeline.

Parameters
{NvsTimelineAnimatedSticker}animatedSticker The current NvsTimelineAnimatedSticker obejct
Returns
{NvsTimelineAnimatedSticker} Return the acquired NvsTimelineAnimatedSticker object.

◆ getNextCaption()

NvsTimeline::getNextCaption (   caption)
inline

Get the next caption of the current caption on the timeline.

Parameters
{NvsTimelineCaption}caption The current caption on the timeline
Returns
{NvsTimelineCaption} Returns the NvsTimelineCaption object.

◆ getNextCompoundCaption()

NvsTimeline::getNextCompoundCaption (   caption)
inline

Get the next compound caption of the current caption on the timeline.

Parameters
{NvsTimelineCompoundCaption}caption The current compound caption on the timeline
Returns
{NvsTimelineCompoundCaption} Returns the compound caption object.

◆ getNextTimelineVideoFx()

NvsTimeline::getNextTimelineVideoFx (   timelineVideoFx)
inline

Get the next timeline video effect of a timeline video effect on the timeline.

Parameters
{NvsTimelineVideoFx}timelineVideoFx The NvsTimelineVideoFx object
Returns
{NvsTimelineVideoFx} Returns the acquired NvsTimelineVideoFx object.

◆ getPrevAnimatedSticker()

NvsTimeline::getPrevAnimatedSticker (   animatedSticker)
inline

Get the previous animated sticker of the current animated sticker of the timeline.

Parameters
{NvsTimelineAnimatedSticker}animatedSticker The current NvsTimelineAnimatedSticker obejct
Returns
{NvsTimelineAnimatedSticker} Get the last animated sticker on the timeline.

◆ getPrevCaption()

NvsTimeline::getPrevCaption (   caption)
inline

Get the previous caption of the current caption on the timeline.

Parameters
{NvsTimelineCaption}caption The current caption on the timeline
Returns
{NvsTimelineCaption} Returns the NvsTimelineCaption object.

◆ getPrevCompoundCaption()

NvsTimeline::getPrevCompoundCaption (   caption)
inline

Get the previous compound caption of the current compound caption on the timeline.

Parameters
{NvsTimelineCompoundCaption}caption The current compound caption on the timeline
Returns
{NvsTimelineCompoundCaption} Returns the compound caption object.

◆ getPrevTimelineVideoFx()

NvsTimeline::getPrevTimelineVideoFx (   timelineVideoFx)
inline

Get the previous timeline video effect of a timeline video effect on the timeline.

Parameters
{NvsTimelineVideoFx}timelineVideoFx The NvsTimelineVideoFx object
Returns
{NvsTimelineVideoFx} Returns the acquired NvsTimelineVideoFx object.

◆ getThemeMusicVolumeGain()

NvsTimeline::getThemeMusicVolumeGain ( )
inline

Get the volume value for theme music.

Returns
{NvsVolume} Returns NvsVolume object.

◆ getTimelineVideoFxByTimelinePosition()

NvsTimeline::getTimelineVideoFxByTimelinePosition (   timelinePos)
inline

Get a list of timeline video effects based on position on the timeline.

Parameters
{Number}timelinePos The position on the timeline (in microseconds)
Returns
{NvsVectorVal<NvsTimelineVideoFx>} Returns an list of timeline video effects in current position. The ordering rules for the acquired timeline video effects are as follows: 1.When adding, the in points are different, arranged in the order of the in points; 2.When adding, the entry points are the same, arranged in the order of adding timeline video effects.

◆ getVideoClipBoundingVerticesRecursively()

NvsTimeline::getVideoClipBoundingVerticesRecursively (   timelinePosition)
inline

Get the bounding vertices of all video clips at timeline position.

Parameters
{Number}timelinePosition Timeline position
Returns
{NvsVectorVal<NvsClipBoundingVerticesInfo>} A std::vector of NvsClipBoundingVerticesInfo

◆ getVideoRes()

NvsTimeline::getVideoRes ( )
inline

Gets video's resolution (image's width, height and aspect ratio).

Returns
{NvsVideoResolution} Returns the NvsVideoResolution object

◆ getVideoTrackByIndex()

NvsTimeline::getVideoTrackByIndex (   trackIndex)
inline

Gets video track with track index.

Parameters
{Number}trackIndex Index of video track
Returns
{NvsVideoTrack} Returns the NvsVideoTrack object.If trackIndex is less than 0 or greater than or equal to the current track number, return null.

◆ getVolumeGain()

NvsTimeline::getVolumeGain ( )
inline

Get the volume information.

Returns
{NvsVolume} Returns the volume object.

◆ getWatermarkInfo()

NvsTimeline::getWatermarkInfo ( )
inline

get watermark information

Returns
{NvsWatermarkInfo}

◆ insertAudioTrack()

NvsTimeline::insertAudioTrack (   insertPoint)
inline

Appends audio track.

Parameters
{Number}insertPoint Index of the inserted track.If you pass in an index less than 0 or more than current audio track count, it will be inserted at the end of the current audio track number.
Returns
{NvsAudioTrack} returns the appended NvsAudioTrack object. When adding more than one audio track, null may be returned due to multi-musictrack authorization.

◆ insertVideoTrack()

NvsTimeline::insertVideoTrack (   insertPoint)
inline

Insert video track.

Parameters
{Number}insertPoint Index of the inserted track.If you pass in an index less than 0 or more than current video track count, it will be inserted at the end of the current video track number.
Returns
{NvsVideoTrack} Returns the insert NvsVideoTrack object. When adding more than one video track, null may be returned due to multi-videotrack authorization.This interface will cause the streaming engine state to jump to the state of stopping engine.

◆ isRenderOrderByZValueEnabled()

NvsTimeline::isRenderOrderByZValueEnabled ( )
inline

Whether to turn on use Z value as the rendering order.

Returns
{Boolean} Returns True means has turn on, otherwise not

◆ removeAnimatedSticker()

NvsTimeline::removeAnimatedSticker (   animatedSticker)
inline

Remove an animated sticker on the timeline.

Parameters
{NvsTimelineAnimatedSticker}animatedSticker The NvsTimelineAnimatedSticker object which will be removed
Returns
{NvsTimelineAnimatedSticker} Return the next NvsTimelineAnimatedSticker object.

◆ removeAudioTrack()

NvsTimeline::removeAudioTrack (   trackIndex)
inline

remove Remove audio track.

Parameters
{Number}trackIndex Index of audio track
Returns
{Boolean} Returns a BOOL value.YES means it removes successfully, NO means it fails.If trackIndex is less than 0 or greater than or equal to the current track number, return NO.

◆ removeCaption()

NvsTimeline::removeCaption (   caption)
inline

Remove the caption on the timeline.

Parameters
{NvsTimelineCaption}caption timeline caption object which removed
Returns
{NvsTimelineCaption} Returns the next NvsTimelineCaption object.

◆ removeCompoundCaption()

NvsTimeline::removeCompoundCaption (   caption)
inline

Remove compound caption from the timeline.

Parameters
{NvsTimelineCompoundCaption}caption Timeline compound caption object which to be removed
Returns
{NvsTimelineCompoundCaption} Returns the next compound caption object.

◆ removeCurrentTheme()

NvsTimeline::removeCurrentTheme ( )
inline

Remove current theme.

Returns
{}

◆ removeTimelineVideoFx()

NvsTimeline::removeTimelineVideoFx (   timelineVideoFx)
inline

remove Remove a timeline video effect from the timeline.

Parameters
{NvsTimelineVideoFx}timelineVideoFx The NvsTimelineVideoFx object which will be removed
Returns
{NvsTimelineVideoFx} Returns the next NvsTimelineVideoFx object of current timeline video effect which has removed.

◆ removeVideoTrack()

NvsTimeline::removeVideoTrack (   trackIndex)
inline

remove video track

Parameters
{Number}trackIndex Index of video track
Returns
{Boolean} Returns a boolean value.YES means it removes successfully, NO means it fails.If trackIndex is less than 0 or greater than or equal to the current track number, return NO.

◆ setMaxAudioStreamSupportedOnVideoTrack()

NvsTimeline::setMaxAudioStreamSupportedOnVideoTrack (   maxStream)
inline

set max audio stream of video track supported

Parameters
{Number}maxStream max count of stream
Returns
{}

◆ setPlaybackRateControl()

NvsTimeline::setPlaybackRateControl (   playbackRateControlRegions)
inline

set playback rate control

Parameters
{NvsVectorVal}playbackRateControlRegions control region of playback rate
Returns
{}

◆ setThemeMusicVolumeGain()

NvsTimeline::setThemeMusicVolumeGain (   leftVolumeGain,
  rightVolumeGain 
)
inline

Set the volume value for theme music.

Parameters
{Number}leftVolumeGain Left channel, value range [0, 8). The suggestion is [0, 3], if it exceeds 3, the sound may break.
{Number}rightVolumeGain Right channel, value range [0, 8). The suggestion is [0, 3], if it exceeds 3, the sound may break.
Returns
{}

◆ setThemeTitleCaptionText()

NvsTimeline::setThemeTitleCaptionText (   text)
inline

Set the caption text for theme title.

Parameters
{String}text The caption text
Returns
{}

◆ setThemeTrailerCaptionText()

NvsTimeline::setThemeTrailerCaptionText (   text)
inline

Set the caption text for theme trailer.

Parameters
{String}text Caption text
Returns
{}

◆ setVolumeGain()

NvsTimeline::setVolumeGain (   leftVolumeGain,
  rightVolumeGain 
)
inline

Sets the volume.

Parameters
{Number}leftVolumeGain Left volume value
{Number}rightVolumeGain Right volume value
Returns
{}

◆ setWatermarkOpacity()

NvsTimeline::setWatermarkOpacity (   opacity)
inline

Set watermark opacity.

Parameters
{Number}opacity Set watermark opacity.
Returns
{Boolean} The opacity, the range is [0,1]

◆ videoTrackCount()

NvsTimeline::videoTrackCount ( )
inline

Get count of video track.

Returns
{Number} Returns count of video track.

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