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

Video track,the collection of video clips. A video track is an entity that holds video clips, and users can add, insert, and delete multiple video clips. The video track continues to expand as the clip increases, and video transitions can be inserted between clips. When adding a package transition, users need to install it and get the packageID returned as the handle of the transition. For built-in transition, their names are regarded as handle. Note: The index of the video clip starts from 0. More...

Inheritance diagram for NvsVideoTrack:
NvsTrack NvsProjObj

Public Member Functions

 constructor ()
 
 insertClip (videoFilePath, clipIndex)
 Inserts a video clip at the specified clip index on the video track. More...
 
 insertClip2 (videoFilePath, trimIn, trimOut, clipIndex)
 Inserts a video clip of the specified length at the specified clip index on the video track. More...
 
 appendClip (videoFilePath)
 Appends a video clip to the end of the video track. More...
 
 appendClip2 (videoFilePath, trimIn, trimOut)
 Appends a video clip of the specified length to the end of the video track. More...
 
 addClip (videoFilePath, inPoint)
 Adds a video clip at the specified position on the video track. More...
 
 addClip2 (videoFilePath, inPoint, trimIn, trimOut)
 Adds a video clip of the specified length at the specified position on the video track. More...
 
 addClipWithSpeed (videoFilePath, inPoint, speed, keepAudioPitch)
 Add clip with speed. More...
 
 addClipWithSpeed2 (videoFilePath, inPoint, trimIn, trimOut, speed, keepAudioPitch)
 Add clip with speed. More...
 
 addClipWithSpeedExt (videoFilePath, inPoint, outPoint, speed, keepAudioPitch)
 Add clip with speed. More...
 
 addClipWithSpeedExt2 (videoFilePath, inPoint, outPoint, trimIn, trimOut, speed, keepAudioPitch)
 Add clip with speed. More...
 
 insertTimelineClip (timeline, clipIndex)
 Inserts a timeline clip at the specified clip index on the video track. More...
 
 insertTimelineClip2 (timeline, trimIn, trimOut, clipIndex)
 Inserts a timeline clip of the specified length at the specified clip index on the video track. More...
 
 addTimelineClip (timeline, inPoint)
 Adds a timeline clip at the specified position on the video track. More...
 
 addTimelineClip2 (timeline, inPoint, trimIn, trimOut)
 Adds a timeline clip of the specified length at the specified position on the video track. More...
 
 getClipByIndex (index)
 Get clip by index. More...
 
 getClipByTimelinePosition (timelinePos)
 Gets video clip by index. More...
 
 setBuiltinTransition (srcClipIndex, transitionName)
 Sets built-in transitions. More...
 
 setPackagedTransition (srcClipIndex, packageId)
 Set packaged transition. More...
 
 getTransitionBySourceClipIndex (srcClipIndex)
 Get the transition through the source video clip index. More...
 
 setAvailableInTheme (available)
 set available in theme More...
 
 isAvailableInTheme ()
 available in theme or not More...
 
 getFirstTrackVideoFx ()
 Get the first track video effect on the track. More...
 
 getLastTrackVideoFx ()
 Get the last track video effect on the track. More...
 
 getPrevTrackVideoFx (trackVideoFx)
 Get the previous track video effect of a track video effect on the track. More...
 
 getNextTrackVideoFx (trackVideoFx)
 Get the next track video effect of a track video effect on the track. More...
 
 getTrackVideoFxByPosition (pos)
 Get a list of track video effects based on position on the track. More...
 
 addBuiltinTrackVideoFx (inPoint, duration, videoFxName)
 Add a built-in track video effect on the track. More...
 
 addPackagedTrackVideoFx (inPoint, duration, videoFxPackageId)
 Add a track video effect in the form of a resource package on the track. More...
 
 removeTrackVideoFx (trackVideoFx)
 Remove a track video effect from the track. More...
 
 getFirstCaption ()
 Get the first caption on the track. More...
 
 getLastCaption ()
 Get the last caption on the track. More...
 
 getPrevCaption (caption)
 Get the previous caption of the current caption on the track. More...
 
 getNextCaption (caption)
 Get the next caption of the current caption on the track. More...
 
 getCaptionsByTimelinePosition (pos)
 Get the caption by timeline position. More...
 
 addCaption (text, inPoint, duration, captionStylePackageId, isPanoramic)
 Add a caption on the track. More...
 
 addModularCaption (text, inPoint, duration)
 Add a caption on the track. More...
 
 removeCaption (caption)
 Remove the caption on the track. More...
 
 getFirstCompoundCaption ()
 Get the first compound caption on the track. More...
 
 getLastCompoundCaption ()
 Get the last compound caption on the track. More...
 
 getPrevCompoundCaption (caption)
 Get the previous compound caption of the current caption on the timeline. More...
 
 getNextCompoundCaption (caption)
 Get the next compound caption of the current caption on the timeline. More...
 
 getCompoundCaptionsByTimelinePosition (pos)
 Get a list of compound captions based on the position on the track. More...
 
 addCompoundCaption (inPoint, duration, compoundCaptionPackageId)
 Get a list of compound captions based on the position on the track. More...
 
 removeCompoundCaption (caption)
 Remove compound caption from the track. More...
 
 getFirstAnimatedSticker ()
 Get the first animated sticker on the track. More...
 
 getLastAnimatedSticker ()
 Get the last animated sticker on the track. More...
 
 getPrevAnimatedSticker (animatedSticker)
 Get the previous animated sticker of the current animated sticker of the track. More...
 
 getNextAnimatedSticker (animatedSticker)
 Get the next animated sticker of the current animated sticker of the track. More...
 
 getAnimatedStickersByTimelinePosition (pos)
 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 track. More...
 
- Public Member Functions inherited from NvsTrack
 constructor ()
 NvsFx constructor.
 
 getType ()
 Get track type. More...
 
 getIndex ()
 Gets track index. More...
 
 getDuration ()
 Gets track length. More...
 
 getClipCount ()
 Gets the number of clips on the track. More...
 
 changeInPoint (clipIndex, newInPoint)
 Modifies the clip's in-point on timeline.If clip does not have this function authorization to return the current InPoint. If newInPoint is less than the outPoint of the previous clip, return the outPoint of the previous clip directly. If the current clip is the 0th clip, newInPoint is at least 0. This function internally calculates a new trimIn based on newInPoint and modifies the trimIn of the clip. If the new trimIn is less than 0, the corresponding Inpoint value when the trimIn is 0 will be returned; if the newInPoint is greater than trimOut, the corresponding Inpoint value of trimOut-1 will be returned. More...
 
 changeOutPoint (clipIndex, newOutPoint)
 Modifies the clip's out-point on timeline.If clip does not have this function authorization to return the current outPoint.If newOutpoint is less than the outPoint of the clip, then newOutpoint will not be less than inpoint+1; if the clip is followed by nextclip, then newOutpoint will not be greater than the inpoint of nextclip. If the current clip is the last clip, the final outPoint is the duration of the timeline. If newOutpoint is greater than the outPoint of the clip, then the end of the video will be FreezeFrame. This function internally calculates a new trimOut based on newOutPoint, and removes the intermediate transition if the inPoint of the clip is not equal to the outPoint of the next clip. More...
 
 splitClip (clipIndex, splitPoint)
 Splits the specified clip. More...
 
 removeClip (clipIndex, keepSpace)
 Removes the specified clip.You are not allowed to remove the opening and ending of a theme. More...
 
 removeRange (startTimelinePos, endTimelinePos, keepSpace)
 Removes all clips within the specified interval, and adjust the timeline in-point or out-point if the clip only partially overlaps the interval., and adjust the timeline in or out point if the clip only partially overlaps the interval.Failed to remove the fragment if it contains the opening and ending sections of the theme.StartTimeLinepos < 0 or endTimeLinepos <= startTimeLinepos will also remove failure. More...
 
 moveClip (sourceClipIndex, targetClipIndex)
 Moving the specified clip, swapping the two positions of the input, affects the arrangement of the clip on the timeline.,clipIndex and destClipIndex cannot be equal to clipCount. More...
 
 moveClipByPositions (sourceClipIndex, targetTimelinePos, isInsertTarget, keepSpace)
 Moves the specified clip to the input position.. clipIndex greater than or equal to clipCount will fail to remove, targetTimeLinePos equal to 0 will be moved to the 0 position, the theme title title will not be moved. More...
 
 removeAllClips ()
 Removes all the clips. More...
 
 setVolumeGain (leftVolumeGain, rightVolumeGain)
 Sets the volume. The final volume value is the track volume Multiplied by the clip volume. More...
 
 getVolumeGain ()
 Get the volume information. The final volume value is the track volume Multiplied by the clip volume. 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

Video track,the collection of video clips. A video track is an entity that holds video clips, and users can add, insert, and delete multiple video clips. The video track continues to expand as the clip increases, and video transitions can be inserted between clips. When adding a package transition, users need to install it and get the packageID returned as the handle of the transition. For built-in transition, their names are regarded as handle. Note: The index of the video clip starts from 0.

Member Function Documentation

◆ addAnimatedSticker()

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

Add animated sticker.

Parameters
{Number}inPoint The in point of the animated sticker on the track (in microseconds)
{Number}duration The duration of the animation sticker which displayed (in microseconds)
{String}animatedStickerPackageId Animated sticker package Id
{Boolean}isPanoramic Determine whether the animated sticker is a panorama animated sticker or not.
{Boolean}isCustom Determines if it is a custom sticker.
{String}customImagePath Custom image path
Returns
{NvsTrackAnimatedSticker} Return the NvsTrackAnimatedSticker 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 succeed;
  4. If inPoint is less than 0 or greater than or equal to the current track duration, or duration is not greater than 0.

◆ addBuiltinTrackVideoFx()

NvsVideoTrack::addBuiltinTrackVideoFx (   inPoint,
  duration,
  videoFxName 
)
inline

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

Parameters
{Number}inPoint The in point of the track video effect on the track (in microseconds)
{Number}duration Duration of the track video effect which displayed (in microseconds)
{String}videoFxName The video effect name
Returns
{NvsTrackVideoFx} Return the NvsTrackVideoFx object

◆ addCaption()

NvsVideoTrack::addCaption (   text,
  inPoint,
  duration,
  captionStylePackageId,
  isPanoramic 
)
inline

Add a caption on the track.

Parameters
{String}text Text of caption
{Number}inPoint The in point of the caption on the track (in microseconds)
{Number}duration Caption display duration (in microseconds)
{String}captionStylePackageId Caption style package Id.If it does not exist, you can pass an empty string or null.
{Boolean}isPanoramic Determines whether the current caption is a panorama caption.
Returns
{NvsVectorVal<NvsTrackCaption>} Returns the NvsTrackCaption 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 track duration, or duration is not greater than 0.

◆ addClip()

NvsVideoTrack::addClip (   videoFilePath,
  inPoint 
)
inline

Adds a video clip at the specified position on the video track.

Parameters
{String}videoFilePath Video clip path.
{Number}inPoint In point.
Returns
{NvsVideoClip} Returns the appended video clip object.

◆ addClip2()

NvsVideoTrack::addClip2 (   videoFilePath,
  inPoint,
  trimIn,
  trimOut 
)
inline

Adds a video clip of the specified length at the specified position on the video track.

Parameters
{String}videoFilePath Clip path.
{Number}inPoint The in point of the clip on the timeline (in microseconds).
{Number}trimIn clip trim in point (in microseconds).
{Number}trimOut clip trim out point (in microseconds).
Returns
{NvsVideoClip} Returns the added video clip object. When users use addClip() to add clips, the clip to be added will split the current clip at the specified in point on the timeline. In the specified in point, the clips contained in the position corresponding to the length of the clip to be added on the track will be deleted. Then the clips to be added can be added. If there is a gap in the corresponding position, it will be covered directly.

◆ addClipWithSpeed()

NvsVideoTrack::addClipWithSpeed (   videoFilePath,
  inPoint,
  speed,
  keepAudioPitch 
)
inline

Add clip with speed.

Deprecated:
Parameters
{String}videoFilePath video file path
{Number}inPoint in point
{Number}speed speed
{Boolean}keepAudioPitch keep audio pitch
Returns
{NvsVideoClip}

◆ addClipWithSpeed2()

NvsVideoTrack::addClipWithSpeed2 (   videoFilePath,
  inPoint,
  trimIn,
  trimOut,
  speed,
  keepAudioPitch 
)
inline

Add clip with speed.

Deprecated:
Parameters
{String}videoFilePath video file path
{Number}inPoint in point
{Number}trimIn trim in
{Number}trimOut trim out
{Number}speed speed
{Boolean}keepAudioPitch keep audio pitch
Returns
{NvsVideoClip}

◆ addClipWithSpeedExt()

NvsVideoTrack::addClipWithSpeedExt (   videoFilePath,
  inPoint,
  outPoint,
  speed,
  keepAudioPitch 
)
inline

Add clip with speed.

Parameters
{String}videoFilePath video file path
{Number}inPoint in point
{Number}outPoint out point
{Number}speed speed
{Boolean}keepAudioPitch keep audio pitch
Returns
{NvsVideoClip}

◆ addClipWithSpeedExt2()

NvsVideoTrack::addClipWithSpeedExt2 (   videoFilePath,
  inPoint,
  outPoint,
  trimIn,
  trimOut,
  speed,
  keepAudioPitch 
)
inline

Add clip with speed.

Parameters
{String}videoFilePath video file path
{Number}inPoint in point
{Number}outPoint out point
{Number}trimIn trim in
{Number}trimOut trim out
{Number}speed speed
{Boolean}keepAudioPitch keep audio pitch
Returns
{NvsVideoClip}

◆ addCompoundCaption()

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

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

Parameters
{Number}inPoint The in point of the caption on the track (in microseconds)
{Number}duration Caption display duration (in microseconds)
{String}compoundCaptionPackageId Caption style package Id.If it does not exist, you can pass an empty string or null.
Returns
{NvsVectorVal<NvsTrackCompoundCaption>} Returns a list of compound captions at the current position。 Returns the NvsTrackCaption object. It will return null in the following situations:
  1. No compound caption function authorization;
  2. If inPoint is less than 0 or greater than or equal to the current track duration, or duration is not greater than 0.

◆ addModularCaption()

NvsVideoTrack::addModularCaption (   text,
  inPoint,
  duration 
)
inline

Add a caption on the track.

Parameters
{String}text Text of caption
{Number}inPoint The in point of the caption on the track (in microseconds)
{Number}duration Caption display duration (in microseconds)
{String}captionStylePackageId Caption style package Id.If it does not exist, you can pass an empty string or null.
{Boolean}isPanoramic Determines whether the current caption is a panorama caption.
Returns
{NvsVectorVal<NvsTrackCaption>} Returns the NvsTrackCaption 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 track duration, or duration is not greater than 0.

◆ addPackagedTrackVideoFx()

NvsVideoTrack::addPackagedTrackVideoFx (   inPoint,
  duration,
  videoFxPackageId 
)
inline

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

Parameters
{Number}inPoint The in point of the track video effect on the track (in microseconds)
{Number}duration Duration of the track video effect which displayed (in microseconds)
{String}videoFxPackageId The Id of resource package
Returns
{NvsTrackVideoFx} Return the NvsTrackVideoFx object

◆ addTimelineClip()

NvsVideoTrack::addTimelineClip (   timeline,
  inPoint 
)
inline

Adds a timeline clip at the specified position on the video track.

Parameters
{NvsTimeline}timeline Timeline.
{Number}inPoint In point.
Returns
{NvsVideoClip} Returns the appended video clip object.

◆ addTimelineClip2()

NvsVideoTrack::addTimelineClip2 (   timeline,
  inPoint,
  trimIn,
  trimOut 
)
inline

Adds a timeline clip of the specified length at the specified position on the video track.

Parameters
{NvsTimeline}timeline Timeline.
{Number}inPoint The in point of the clip on the timeline (in microseconds).
{Number}trimIn clip trim in point (in microseconds).
{Number}trimOut clip trim out point (in microseconds).
Returns
{NvsVideoClip} Returns the added video clip object. When users use addClip() to add clips, the clip to be added will split the current clip at the specified in point on the timeline. In the specified in point, the clips contained in the position corresponding to the length of the clip to be added on the track will be deleted. Then the clips to be added can be added. If there is a gap in the corresponding position, it will be covered directly.

◆ appendClip()

NvsVideoTrack::appendClip (   videoFilePath)
inline

Appends a video clip to the end of the video track.

Parameters
{String}videoFilePath Video clip path.
Returns
{NvsVideoClip} Returns the appended video clip object.

◆ appendClip2()

NvsVideoTrack::appendClip2 (   videoFilePath,
  trimIn,
  trimOut 
)
inline

Appends a video clip of the specified length to the end of the video track.

Parameters
{String}videoFilePath Video clip path.
{Number}trimIn Trim in point of video clips (in microseconds).
{Number}trimOut Trim out point of video clips (in microseconds).
Returns
{NvsVideoClip} Returns the appended video clip object.

◆ constructor()

NvsVideoTrack::constructor ( )
inline

@constructor

◆ getAnimatedStickersByTimelinePosition()

NvsVideoTrack::getAnimatedStickersByTimelinePosition (   pos)
inline

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

Parameters
{Number}pos Position on the timeline (in microseconds)
Returns
{NvsVectorVal<NvsTrackAnimatedSticker>} 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.

◆ getCaptionsByTimelinePosition()

NvsVideoTrack::getCaptionsByTimelinePosition (   pos)
inline

Get the caption by timeline position.

Parameters
{Number}pos The position on the track(in micro-second)
Returns
{NvsVectorVal<NvsTrackCaption>} 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.

◆ getClipByIndex()

NvsVideoTrack::getClipByIndex (   index)
inline

Get clip by index.

Parameters
{Number}index Video clip index. Clip index value range: NvsVideoTrack m_videoTrack;//m_videoTrack omitted creation int clipCount = m_videoTrack.getClipCount(); The value of clipIndex is [0, clipCount-1]
Returns
{NvsVideoClip} Returns the captured video clip object.

◆ getClipByTimelinePosition()

NvsVideoTrack::getClipByTimelinePosition (   timelinePos)
inline

Gets video clip by index.

Parameters
{Number}timelinePos Position on the timeline (in microseconds).
Returns
{NvsVideoClip} Returns the captured video clip object.

◆ getCompoundCaptionsByTimelinePosition()

NvsVideoTrack::getCompoundCaptionsByTimelinePosition (   pos)
inline

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

Parameters
{Number}pos The position on the track(in micro-second)
Returns
{NvsVectorVal<NvsTrackCompoundCaption>} 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.

◆ getFirstAnimatedSticker()

NvsVideoTrack::getFirstAnimatedSticker ( )
inline

Get the first animated sticker on the track.

Returns
{NvsTrackAnimatedSticker} Return the acquired NvsTrackAnimatedSticker object.

◆ getFirstCaption()

NvsVideoTrack::getFirstCaption ( )
inline

Get the first caption on the track.

Returns
{NvsTrackCaption} Returns the NvsTrackCaption object.

◆ getFirstCompoundCaption()

NvsVideoTrack::getFirstCompoundCaption ( )
inline

Get the first compound caption on the track.

Returns
{NvsTrackCompoundCaption} Returns the compound caption object.

◆ getFirstTrackVideoFx()

NvsVideoTrack::getFirstTrackVideoFx ( )
inline

Get the first track video effect on the track.

Returns
{NvsTrackVideoFx} Returns the acquired NvsTrackVideoFx object.

◆ getLastAnimatedSticker()

NvsVideoTrack::getLastAnimatedSticker ( )
inline

Get the last animated sticker on the track.

Returns
{NvsTrackAnimatedSticker} Return the acquired NvsTrackAnimatedSticker object.

◆ getLastCaption()

NvsVideoTrack::getLastCaption ( )
inline

Get the last caption on the track.

Returns
{NvsTrackCaption} Returns the NvsTrackCaption object.

◆ getLastCompoundCaption()

NvsVideoTrack::getLastCompoundCaption ( )
inline

Get the last compound caption on the track.

Returns
{NvsTrackCompoundCaption} Returns the compound caption object.

◆ getLastTrackVideoFx()

NvsVideoTrack::getLastTrackVideoFx ( )
inline

Get the last track video effect on the track.

Returns
{NvsTrackVideoFx} Returns the acquired NvsTrackVideoFx object.

◆ getNextAnimatedSticker()

NvsVideoTrack::getNextAnimatedSticker (   animatedSticker)
inline

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

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

◆ getNextCaption()

NvsVideoTrack::getNextCaption (   caption)
inline

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

Parameters
{NvsTrackCaption}caption The current caption on the track
Returns
{NvsTrackCaption} Returns the NvsTrackCaption object.

◆ getNextCompoundCaption()

NvsVideoTrack::getNextCompoundCaption (   caption)
inline

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

Parameters
{NvsTrackCompoundCaption}caption The current caption on the video track
Returns
{NvsTrackCompoundCaption} Returns the next NvsTrackCompoundCaption object.

◆ getNextTrackVideoFx()

NvsVideoTrack::getNextTrackVideoFx (   trackVideoFx)
inline

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

Parameters
{NvsTrackVideoFx}trackVideoFx The NvsTrackVideoFx object
Returns
{NvsTrackVideoFx} Returns the acquired NvsTrackVideoFx object.

◆ getPrevAnimatedSticker()

NvsVideoTrack::getPrevAnimatedSticker (   animatedSticker)
inline

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

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

◆ getPrevCaption()

NvsVideoTrack::getPrevCaption (   caption)
inline

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

Parameters
{NvsTrackCaption}caption The current caption on the track
Returns
{NvsTrackCaption} Returns the NvsTrackCaption object.

◆ getPrevCompoundCaption()

NvsVideoTrack::getPrevCompoundCaption (   caption)
inline

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

Parameters
{NvsTrackCompoundCaption}caption The current caption on the video track
Returns
{NvsTrackCompoundCaption} Returns the next NvsTrackCompoundCaption object.

◆ getPrevTrackVideoFx()

NvsVideoTrack::getPrevTrackVideoFx (   trackVideoFx)
inline

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

Parameters
{NvsTrackVideoFx}trackVideoFx The NvsTrackVideoFx object
Returns
{NvsTrackVideoFx} Returns the acquired NvsTrackVideoFx object.

◆ getTrackVideoFxByPosition()

NvsVideoTrack::getTrackVideoFxByPosition (   pos)
inline

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

Parameters
{Number}pos The position on the track (in microseconds)
Returns
{NvsVectorVal<NvsTrackVideoFx>} Returns an list of track video effects in current position. The ordering rules for the acquired track 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 track video effects.

◆ getTransitionBySourceClipIndex()

NvsVideoTrack::getTransitionBySourceClipIndex (   srcClipIndex)
inline

Get the transition through the source video clip index.

Parameters
{Number}srcClipIndex Source video clip index.
Returns
{NvsVideoTransition} Returns the obtained video transition object.

◆ insertClip()

NvsVideoTrack::insertClip (   videoFilePath,
  clipIndex 
)
inline

Inserts a video clip at the specified clip index on the video track.

Parameters
{String}videoFilePath Video clip path.
{Number}clipIndex Index of the inserted clip.
Returns
{NvsVideoClip} Returns the inserted video clip object. Function insertClip() inserts a clip right before the one indexed by clipIndex.

◆ insertClip2()

NvsVideoTrack::insertClip2 (   videoFilePath,
  trimIn,
  trimOut,
  clipIndex 
)
inline

Inserts a video clip of the specified length at the specified clip index on the video track.

Parameters
{String}videoFilePath Video clip path.
{Number}trimIn Trim in point of video clips (in microseconds)
{Number}trimOut Trim out point of video clips (in microseconds))
{Number}clipIndex insert point
Returns
{NvsVideoClip} Returns the inserted video clip object.

◆ insertTimelineClip()

NvsVideoTrack::insertTimelineClip (   timeline,
  clipIndex 
)
inline

Inserts a timeline clip at the specified clip index on the video track.

Parameters
{NvsTimeline}timeline Timeline.
{Number}clipIndex Index of the inserted clip.
Returns
{NvsVideoClip} Returns the inserted video clip object. Function insertTimelineClip() inserts a clip right before the one indexed by clipIndex.

◆ insertTimelineClip2()

NvsVideoTrack::insertTimelineClip2 (   timeline,
  trimIn,
  trimOut,
  clipIndex 
)
inline

Inserts a timeline clip of the specified length at the specified clip index on the video track.

Parameters
{NvsTimeline}timeline Timeline.
{Number}trimIn Trim in
{Number}trimOut Trim out
{Number}clipIndex Index of the inserted clip.
Returns
{NvsVideoClip} Returns the inserted video clip object. Function insertTimelineClip2() inserts a clip right before the one indexed by clipIndex.

◆ isAvailableInTheme()

NvsVideoTrack::isAvailableInTheme ( )
inline

available in theme or not

Returns
{Boolean}

◆ removeAnimatedSticker()

NvsVideoTrack::removeAnimatedSticker (   animatedSticker)
inline

Remove an animated sticker on the track.

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

◆ removeCaption()

NvsVideoTrack::removeCaption (   caption)
inline

Remove the caption on the track.

Parameters
{NvsTrackCaption}caption track caption object which removed
Returns
{NvsTrackCaption} Returns the next NvsTrackCaption object.

◆ removeCompoundCaption()

NvsVideoTrack::removeCompoundCaption (   caption)
inline

Remove compound caption from the track.

Parameters
{Number}track compound caption object which to be removed
Returns
{NvsTrackCompoundCaption} Returns the next compound caption object.

◆ removeTrackVideoFx()

NvsVideoTrack::removeTrackVideoFx (   trackVideoFx)
inline

Remove a track video effect from the track.

Parameters
{NvsTrackVideoFx}trackVideoFx The NvsTrackVideoFx object which will be removed
Returns
{NvsTrackVideoFx} Returns the next NvsTrackVideoFx object of current track video effect which has removed.

◆ setAvailableInTheme()

NvsVideoTrack::setAvailableInTheme (   available)
inline

set available in theme

Parameters
{Boolean}available available or not
Returns
{Boolean}

◆ setBuiltinTransition()

NvsVideoTrack::setBuiltinTransition (   srcClipIndex,
  transitionName 
)
inline

Sets built-in transitions.

Parameters
{Number}srcClipIndex Source video clip index.
{String}transitionName The name of the transition.
Returns
{NvsVideoTransition} Returns the video transition object. If the transitionName is set to a null string (namely, to delete the original transition), return null.

◆ setPackagedTransition()

NvsVideoTrack::setPackagedTransition (   srcClipIndex,
  packageId 
)
inline

Set packaged transition.

Parameters
{Number}srcClipIndex Source video clip index.
{String}packageId Transition resource package ID. If the package Id is null, the transition at the video clip is deleted; if the package Id is set to "theme", the transition at the video clip is set to the one of the current theme. If there is no theme, the transition at the video clip should be deleted.
Returns
{NvsVideoTransition} Returns the video transition object.

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