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

Audio clip, description of audio file. You can also modify the trim in point and out point of audio clip, insert and remove multiple audio special effects, as well as the playback speed. More...

Inheritance diagram for NvsAudioClip:
NvsClip NvsProjObj

Public Member Functions

 constructor ()
 
 appendFx (fxName)
 Adds an audio effect to the end of the audio clip. More...
 
 insertFx (fxName, fxIndex)
 Inserts an audio effect at the specified effect index on the audio clip. More...
 
 removeFx (fxIndex)
 Removes audio effect by index, The subsequent audioFx index moves forward.Determines if the audio effect is removed successfully. true means a successfull removal, false means failure.This interface causes the streaming engine state to jump to the engine stop state. More...
 
 getFxByIndex (fxIndex)
 Gets audio effect by index. More...
 
 setAudioStreamIndex (streamIndex)
 Configuration of audio streaming index. More...
 
 getAudioSteramIndex ()
 Get index of audio stream. More...
 
- Public Member Functions inherited from NvsClip
 constructor ()
 
 getTrimIn ()
 Gets the trim in point of the clip. More...
 
 getTrimOut ()
 Gets the trim out point of the clip. More...
 
 moveTrimPoint (offset)
 Move trim points of clip(in microseconds). More...
 
 getInPoint ()
 Gets the in-point of the clip on the timeline. More...
 
 getOutPoint ()
 Gets the out-point of the clip on the timeline. More...
 
 getType ()
 Gets the clip type (video clip, audio clip). More...
 
 getIndex ()
 Gets the index of the clip on the track. More...
 
 getFilePath ()
 Gets the clip file path. More...
 
 getFxCount ()
 Gets the number of effects on the clip. Note: The effect index on the clip starts from 0. More...
 
 changeTrimInPoint (newTrimInPoint, affectSibling)
 Modifies the trim in point of the clip. This interface will cause the streaming engine state to jump to the engine stop state, please refer to Engine Change Feature for details. More...
 
 changeTrimOutPoint (newTrimOutPoint, affectSibling)
 Modifies the trim out point of the clip. This interface will cause the streaming engine state to jump to the engine stop state, refer to Engine Change Feature for details. More...
 
 getSpeed ()
 Get the playback speed of the clip.The default value is 1, which means that it plays at normal speed; the value less than 1 means slower playback; the value greater than 1 means faster playback Returns the playback speed of the current clip. More...
 
 changeSpeed (newSpeed, keepAudioPitch)
 Changes the playback speed of the clip.This interface will cause the streaming engine state to jump to the engine stop state. More...
 
 changeSpeedWithOutPoint (outPoint, newSpeed, keepAudioPitch)
 Changes the playback speed of the clip.This interface will cause the streaming engine state to jump to the engine stop state. More...
 
 isKeepAudioPitch ()
 Whether keep the tone unchanged. More...
 
 getVolumeGain ()
 Gets volume. More...
 
 setVolumeGain (leftVolumeGain, rightVolumeGain)
 Sets the volume. More...
 
 setFadeInDuration (duration)
 Sets the fade-in time. More...
 
 getFadeInDuration ()
 Gets fade-in time. More...
 
 setFadeOutDuration (duration)
 Sets fade-out time.Fade-out duration in microseconds, 0 means no fade-out.Duration must >= 0. More...
 
 getFadeOutDuration ()
 Gets fade-out time. More...
 
 changeCurvesVariableSpeed (curvesString, keepAudioPitch)
 Changes the playback speed of the clip by curves(only support for video clip).This interface will cause the streaming engine state to jump to the engine stop state. More...
 
 changeCurvesVariableSpeedWithOutPoint (outPoint, curvesString, keepAudioPitch)
 Changes the playback speed of the clip by curves(only support for video clip).This interface will cause the streaming engine state to jump to the engine stop state. More...
 
 getClipVariableSpeedCurvesString ()
 Get current variable speed curves of clip.The x coords at the each output curves' endpoint is relative,user can scale x to any size. eg: scale curves range to equal with clip length. More...
 
 getClipPosByTimelinePosCurvesVariableSpeed (timelinePos)
 Gets the pos in clip by current timeline pos when used curves variable speed. More...
 
 getTimelinePosByClipPosCurvesVariableSpeed (clipPos)
 Gets the pos in timelne by current clip pos when used curves variable speed. More...
 
 getAudioVolumeFx ()
 Gets the audio volume effect of the clip. More...
 
 getInternalTimeline ()
 Gets the internal timeline object from the clip. More...
 
 isTimelineClip ()
 Is timeline clip. More...
 
 changeClipFilePath (clipFilePath)
 Change the path of clip. 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

Audio clip, description of audio file. You can also modify the trim in point and out point of audio clip, insert and remove multiple audio special effects, as well as the playback speed.

See also
NvsClip

Member Function Documentation

◆ appendFx()

NvsAudioClip::appendFx (   fxName)
inline

Adds an audio effect to the end of the audio clip.

Parameters
{String}fxName Audio effect name
Returns
{NvsAudioFx} Returns the appended audio effect object.Returns the appended audio effect object.This interface causes the streaming engine state to jump to the engine stop state.

◆ constructor()

NvsAudioClip::constructor ( )
inline

@constructor

◆ getAudioSteramIndex()

NvsAudioClip::getAudioSteramIndex ( )
inline

Get index of audio stream.

Returns
{NvsAudioStreamInfo}

◆ getFxByIndex()

NvsAudioClip::getFxByIndex (   fxIndex)
inline

Gets audio effect by index.

Parameters
{Number}fxIndex Audio effect's index. Range [0, getFxCount())
Returns
{NvsAudioFx} Returns the acquired audio effect object.

◆ insertFx()

NvsAudioClip::insertFx (   fxName,
  fxIndex 
)
inline

Inserts an audio effect at the specified effect index on the audio clip.

Parameters
{String}fxName Audio effect name.For information about getting all effects' names
{Number}fxIndex Audio effects' index to insert at. Range [0, getFxCount() - 1 ). If index is outOfRange,It will be add in the end.
Returns
{NvsAudioFx} Returns the inserted audio effect object.This interface will cause the streaming engine state to jump to the engine stop state.

◆ removeFx()

NvsAudioClip::removeFx (   fxIndex)
inline

Removes audio effect by index, The subsequent audioFx index moves forward.Determines if the audio effect is removed successfully. true means a successfull removal, false means failure.This interface causes the streaming engine state to jump to the engine stop state.

Parameters
{Number}fxIndex Audio effects' index. Range [0, getFxCount())
Returns
{Boolean} Removes the special effect from the specified index,The subsequent audioFx index moves forward.

◆ setAudioStreamIndex()

NvsAudioClip::setAudioStreamIndex (   streamIndex)
inline

Configuration of audio streaming index.

Parameters
{Number}streamIndex The stream index
Returns
{}

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