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

Streaming context:The streaming context class(NvsStreamingContext) can be refered to as the entry point of the whole SDK framework. In the process of development, NvsStreamingContext provides the static sharedInstance interface, which is the only instance to create streaming context. Through this instantce object, we can turn on the recording device to record videos, adding effects to capture videos, set various parameters for recording, which include autofocus, automatic exposure adjustment, swtiching on/off of the light supplement and so on. Meanwhile, this instance can also create timelines, connecting timelines to real-time preview windows to view the recorded videos in real-time. When the whole video has been produced completely, please destroy the instances of streaming context. When recording with special effects or adding resources packages (recording effects package, scene resources package and so on), one has to first install the package and obtain packageID after installation. For built-in special effects, one only needs to obtain the name of the effect in order to use them. In the SDK, users need to adopt the full pathway when importing resources or authorizations. More...

Public Member Functions

 constructor ()
 
get onStreamingEngineStateChanged ()
 State change of streaming engine. More...
 
set onStreamingEngineStateChanged (fun)
 
get onSeekingTimelinePosition ()
 Current postion of timeline refer toking. More...
 
set onSeekingTimelinePosition (fun)
 
 streamingEngineReadyForTimelineModification ()
 ready for modify timeline of streaming engine More...
 
 lastSeekingFinished ()
 
 verifySdkLicenseFile (requestUrl, type='')
 Verifies the SDK license. More...
 
 verifySdkLicenseFileWithExtraUserData (requestUrl, extraUserData)
 verify sdk licence file with extra user data More...
 
 getSdkVersion ()
 Obtains Meishe SDK's version information. More...
 
 createTimeline (videoRes, fps, audioRes, flags=0)
 Creates timeline. More...
 
 createTemplateTimeline (templateId, templateFootages, flags=0)
 Create template timeline according template id. More...
 
 createEmptyTemplateTimeline (videoRes, fps, audioRes, templateId, flags=0)
 Create timeline of empty template. More...
 
 loadProject (projectId, resourceDir, flags=0)
 Returns created timeline object. More...
 
 removeTimeline (timeline)
 Removes timeline. More...
 
 createLiveWindow (canvasId)
 create streaming live window according canvas id More...
 
 removeLiveWindow (liveWindow)
 remvoe live window More...
 
 connectTimelineWithLiveWindow (timeline, liveWindow)
 Connects timeline with the LiveWindow. More...
 
 disconnectLiveWindow (liveWindow)
 Disconnects timeline with the LiveWindow. More...
 
 seekTimeline (timeline, timestamp, videoSizeMode, flags)
 Seeking the frame at a specific timestamp. More...
 
 seekTimelineWithProxyScale (timeline, timestamp, proxyScale, flags)
 Seeking the frame at a specific timestamp with proxy scale. More...
 
 playbackTimeline (timeline, startTime, endTime, videoSizeMode, preload, flags)
 Timeline playback. More...
 
 playbackTimelineWithProxyScale (timeline, startTime, endTime, proxyScale, preload, flags)
 playback timeline with proxy scale More...
 
 stop ()
 Stops the engine. More...
 
 getTimelineCurrentPosition (timeline)
 Gets the current positon of the timeline (in microseconds) More...
 
 getStreamingEngineState ()
 Gets streaming engine's state. More...
 
 getAssetPackageManager ()
 Gets resource package manager. More...
 
 getAVFileInfo (avFilePath, extraFlag)
 Gets detailed information of the audio/video file. More...
 
 getLocalAVFileIcon (localAVFilePath, timestamp, iconFetched)
 Start an local AV file icon fetching task. More...
 
 getLocalAVFileIconFromCache (localAVFilePath, timestamp)
 Fetch local AV file icon from cache. More...
 
 getLocalAVFileThumbnail (localAVFilePath, timestamp, bypassCache, thumbnailFetched)
 Start an local AV file thumbnail fetching task. More...
 
 cancelLocalAVFileIconFetchingTask (iconFetchingTaskId)
 Cancel icon fetching task for a specific task id. More...
 
 clearLocalAVFileIconCache ()
 Clear all cached icons of local AV file.
 
 getLocalAVFileWaveformData (localAVFilePath, sampleCountPerGroup, startGroupIndex, groupCount, waveformDataFetched)
 Start an local AV file waveform data fetching task. More...
 
 cancelLocalAVFileWaveformDataFetchingFetchingTask (waveformDataFetchingTaskId)
 Cancel waveform data fetching task for a specific task id. More...
 
 clearLocalAVFileWaveformDataCache ()
 Clear all cached waveform data of local AV file.
 
 registerLocalFile (file)
 Register a local File object. More...
 
 unregisterLocalFile (localFileId)
 Unregister a local File object according to its identifier. More...
 
 registerFontByFilePath (fontFilePath)
 Gets font file's fontFamily. More...
 
 getFontCompoundFamilyNameByFilePath (fontFilePath)
 Get the compound family name of font file. More...
 
 grabImageFromTimeline (timeline, timestamp, proxyScale, flags)
 Gets the specific frame in timeline with a specific timestamp. More...
 
 setAudioOutputDeviceVolume (volume)
 Set volume to audio output device. More...
 
 setMaxVideoFileReaderCount (count)
 set max count of video file reader More...
 
 getMaxVideoFileReaderCount ()
 get max count of video file reader More...
 
 setMaxImageReaderCount (count)
 set max count of image reader More...
 
 getMaxImageReaderCount ()
 get max count of image reader More...
 
 setMaxVideoDecodingThreadCount (count)
 set max count of video decoding thread More...
 
 functionalityAuthorised (sdkFunctionName)
 function authorise More...
 
 setUseChineseLanguageOnly (useChineseLanguageOnly)
 set Chinese language only More...
 
 isUseChineseLanguageOnly ()
 Chinese language only or not. More...
 
 initHumanDetection (modelFilePath, licenseFilePath, features)
 Initializes human detection. Only once needed. More...
 
 initHumanDetectionExt (modelFilePath, licenseFilePath, features)
 Initializes human detection. Need use initHumanDetection first. More...
 
 setupHumanDetectionData (dataType, dataFilePath)
 Setup human detection data. More...
 
 closeHumanDetection ()
 Turns off the human detection mechanism. More...
 
 calcDurationAfterCurvesVariableSpeed (curvesString)
 Calculate duration after using curves variable speed. More...
 
 clearCachedResources ()
 Clears cached resources. More...
 
 preloadEffectResources ()
 preload effects resource More...
 
 notifyUpdateToWebReader (webAVFilePath)
 update the notify to webReader More...
 
 enableAudioVUMeter (enable)
 enable audio VU meter More...
 
 setDefaultCaptionFade (fade)
 enable caption default fade More...
 
 isDefaultCaptionFade ()
 caption default fade is enabled or not More...
 
 isDecoderConfigSupported (codecType, codecAcceleration)
 Video decoder configuration is supported or not. More...
 
 getAutoToneParameters (imageData, width, height, isRawImage)
 get automatic tone parameter More...
 

Detailed Description

Streaming context:The streaming context class(NvsStreamingContext) can be refered to as the entry point of the whole SDK framework. In the process of development, NvsStreamingContext provides the static sharedInstance interface, which is the only instance to create streaming context. Through this instantce object, we can turn on the recording device to record videos, adding effects to capture videos, set various parameters for recording, which include autofocus, automatic exposure adjustment, swtiching on/off of the light supplement and so on. Meanwhile, this instance can also create timelines, connecting timelines to real-time preview windows to view the recorded videos in real-time. When the whole video has been produced completely, please destroy the instances of streaming context. When recording with special effects or adding resources packages (recording effects package, scene resources package and so on), one has to first install the package and obtain packageID after installation. For built-in special effects, one only needs to obtain the name of the effect in order to use them. In the SDK, users need to adopt the full pathway when importing resources or authorizations.

Member Function Documentation

◆ calcDurationAfterCurvesVariableSpeed()

NvsStreamingContext::calcDurationAfterCurvesVariableSpeed (   curvesString)
inline

Calculate duration after using curves variable speed.

Parameters
curvesStringcurves string
Returns
{Number} duration

◆ cancelLocalAVFileIconFetchingTask()

NvsStreamingContext::cancelLocalAVFileIconFetchingTask (   iconFetchingTaskId)
inline

Cancel icon fetching task for a specific task id.

Parameters
{Number}iconFetchingTaskId Icon fetching task identifier to cancel.

◆ cancelLocalAVFileWaveformDataFetchingFetchingTask()

NvsStreamingContext::cancelLocalAVFileWaveformDataFetchingFetchingTask (   waveformDataFetchingTaskId)
inline

Cancel waveform data fetching task for a specific task id.

Parameters
{Number}waveformDataFetchingTaskId Waveform data fetching task identifier to cancel.

◆ clearCachedResources()

NvsStreamingContext::clearCachedResources ( )
inline

Clears cached resources.

Returns
{}

◆ closeHumanDetection()

NvsStreamingContext::closeHumanDetection ( )
inline

Turns off the human detection mechanism.

Returns
{}

◆ connectTimelineWithLiveWindow()

NvsStreamingContext::connectTimelineWithLiveWindow (   timeline,
  liveWindow 
)
inline

Connects timeline with the LiveWindow.

Parameters
{NvsTimeline}timeline Timeline
{NvsLiveWindow}liveWindow Preview image window in real time
Returns
{Boolean} Returns BOOL value. YES means a successful connection, and NO means the opposite.

◆ constructor()

NvsStreamingContext::constructor ( )
inline

@constructor

◆ createEmptyTemplateTimeline()

NvsStreamingContext::createEmptyTemplateTimeline (   videoRes,
  fps,
  audioRes,
  templateId,
  flags = 0 
)
inline

Create timeline of empty template.

Parameters
{NvsVideoResolution}videoRes Video file's resolution (specified width to height ratio). For video editing resolution, when importing corresponding params, the imported image's width has to be a multiple of 4, the height has to be a multiple of 2. Note: if one creates NvsStreamingContext's instance that supports 4K video editing, then video editing's resolution cannot be higher then 3840*2160(imageWidth*imageHeight), otherwise the imageWidth*imageHeight cannot exceed 1920* 1080 pixels.
{NvsRational}fps Frame rate
{NvsAudioResolution}audioRes Audio file's resolution(specified file sampling rate, sampling format and number of channels. For audio editing resolution, imported audio only supports two types of sampling rate, 44100 or 48000.)
{String}templateId template id
{Number}flags flags
Returns
{NvsTimeline} Returns created timeline object,return null if params are invalid

◆ createLiveWindow()

NvsStreamingContext::createLiveWindow (   canvasId)
inline

create streaming live window according canvas id

Parameters
{String}canvasId canvas id
Returns
{NvsLiveWindow} live window

◆ createTemplateTimeline()

NvsStreamingContext::createTemplateTimeline (   templateId,
  templateFootages,
  flags = 0 
)
inline

Create template timeline according template id.

Parameters
{String}templateId template uuid,template must be installed firstly
{NvsVectorVal}templateFootages footage information in the template asset
{Number}flags Special flags for create timeline. If there is no special requirements please input 0.
Returns
{NvsTimeline} Returns created timeline object

◆ createTimeline()

NvsStreamingContext::createTimeline (   videoRes,
  fps,
  audioRes,
  flags = 0 
)
inline

Creates timeline.

Parameters
{NvsVideoResolution}videoRes Video file's resolution (specified width to height ratio). For video editing resolution, when importing corresponding params, the imported image's width has to be a multiple of 4, the height has to be a multiple of 2. Note: if one creates NvsStreamingContext's instance that supports 4K video editing, then video editing's resolution cannot be higher then 3840*2160(imageWidth*imageHeight), otherwise the imageWidth*imageHeight cannot exceed 1920* 1080 pixels.
{NvsRational}fps Frame rate
{NvsAudioResolution}audioRes Audio file's resolution(specified file sampling rate, sampling format and number of channels. For audio editing resolution, imported audio only supports two types of sampling rate, 44100 or 48000.)
{Number}flags Special flags for create timeline. If there is no special requirements please input 0.
Returns
{NvsTimeline} Returns created timeline object,return null if params are invalid

◆ disconnectLiveWindow()

NvsStreamingContext::disconnectLiveWindow (   liveWindow)
inline

Disconnects timeline with the LiveWindow.

Parameters
{NvsLiveWindow}liveWindow Preview image window in real time
Returns
{}

◆ enableAudioVUMeter()

NvsStreamingContext::enableAudioVUMeter (   enable)
inline

enable audio VU meter

Parameters
{Boolean}enable enable or not
Returns
{}

◆ functionalityAuthorised()

NvsStreamingContext::functionalityAuthorised (   sdkFunctionName)
inline

function authorise

Parameters
{String}sdkFunctionName sdk function name
Returns
{Boolean} Returns a BOOL value. YES indicates that the authorization verification is successful, and NO indicates that the verification fails.

◆ getAssetPackageManager()

NvsStreamingContext::getAssetPackageManager ( )
inline

Gets resource package manager.

Returns
{NvsAssetPackageManager} Returns resource package manager object.

◆ getAutoToneParameters()

NvsStreamingContext::getAutoToneParameters (   imageData,
  width,
  height,
  isRawImage 
)
inline

get automatic tone parameter

Parameters
{ImageData}imageData image data
{Number}width width
{Number}height height
{Boolean}isRawImage raw image or not
Returns
{NvsAIToningInfo}

◆ getAVFileInfo()

NvsStreamingContext::getAVFileInfo (   avFilePath,
  extraFlag 
)
inline

Gets detailed information of the audio/video file.

Parameters
{String}avFilePath file path
{Number}extraFlag extra flags
Returns
{NvsAVFileInfo} Returns the audio/video file information object,return null if file format is not supported

◆ getFontCompoundFamilyNameByFilePath()

NvsStreamingContext::getFontCompoundFamilyNameByFilePath (   fontFilePath)
inline

Get the compound family name of font file.

Parameters
{String}fontFilePath Font file path
Returns
{String} The compound family name of font file.

◆ getLocalAVFileIcon()

NvsStreamingContext::getLocalAVFileIcon (   localAVFilePath,
  timestamp,
  iconFetched 
)
inline

Start an local AV file icon fetching task.

Parameters
{String}localAVFilePath local AV file path, e.g. /localmedia/test.mp4.weblocal
{Number}timestamp Timestamp at which to fetch icon from the local AV file, in microseconds.
{Function}iconFetched A function to be executed when the icon has been fetched. It receives the following parameters: imageData: A ImageData object of the icon fetched. localAVFilePath: A string of the local AV file path from which we fetch icon. timestamp: Timestamp of the icon fetched, in microseconds.
Returns
{Number} Returns icon fetching task identifier. return 0 indicates error.

◆ getLocalAVFileIconFromCache()

NvsStreamingContext::getLocalAVFileIconFromCache (   localAVFilePath,
  timestamp 
)
inline

Fetch local AV file icon from cache.

Parameters
{String}localAVFilePath local AV file path, e.g. /localmedia/test.mp4.weblocal
{Number}timestamp time at which to fetch icon from the local AV file, in microseconds.
Returns
{ImageData} Returns a ImageData object of the icon fetched.

◆ getLocalAVFileThumbnail()

NvsStreamingContext::getLocalAVFileThumbnail (   localAVFilePath,
  timestamp,
  bypassCache,
  thumbnailFetched 
)
inline

Start an local AV file thumbnail fetching task.

Parameters
{String}localAVFilePath local AV file path, e.g. /localmedia/test.mp4.weblocal
{Number}timestamp time at which to fetch frame from the local AV file as thumbnail, in microseconds, -1 means the actual timestamp is determined by implementation.
{Boolean}bypassCache Whether to bypass thumnail cache.
{Function}thumbnailFetched A function to be executed when the thumbnail has been fetched. It receives the following parameters: imageData: A ImageData object of the thumbnail fetched. localAVFilePath: A string of the local AV file path from which we fetch thumbnail. timestamp: Timestamp of the thumbnail, in microseconds.
Returns
{Number} Returns icon fetching task identifier. return 0 indicates error.

◆ getLocalAVFileWaveformData()

NvsStreamingContext::getLocalAVFileWaveformData (   localAVFilePath,
  sampleCountPerGroup,
  startGroupIndex,
  groupCount,
  waveformDataFetched 
)
inline

Start an local AV file waveform data fetching task.

Parameters
{String}localAVFilePath local AV file path, e.g. /localmedia/test.m4a.weblocal
{Number}sampleCountPerGroup Indicates the sample count in a group where we extract a minimal/maximum waveform data pair.
{Number}startGroupIndex Start group index to fetch waveform data.
{Number}groupCount Group count to fetch waveform data. -1 indicates fetching waveform data till the end of the local AV file.
{Function}waveformDataFetched A function to be executed when the waveform data has been fetched. It receives the following parameters: leftChannelData: A Float32Array object to hold left channel waveform data, The array contain a sequence of min/max waveform data values. rightChannelData: Same as leftChannelData but it hold right channel waveform data. localAVFilePath: A string of the local AV file path from which we fetch waveform data. sampleCountPerGroup: sampleCountPerGroup parameter of the task. startGroupIndex: startGroupIndex parameter of the task.
Returns
{Number} Returns waveform data fetching task identifier. return 0 indicates error.

◆ getMaxImageReaderCount()

NvsStreamingContext::getMaxImageReaderCount ( )
inline

get max count of image reader

Returns
{Number} max count of image reader

◆ getMaxVideoFileReaderCount()

NvsStreamingContext::getMaxVideoFileReaderCount ( )
inline

get max count of video file reader

Returns
{Number} max count of video file reader

◆ getSdkVersion()

NvsStreamingContext::getSdkVersion ( )
inline

Obtains Meishe SDK's version information.

Returns
{NvsSdkVersion} Returns the object about Meishe SDK's version information.

◆ getStreamingEngineState()

NvsStreamingContext::getStreamingEngineState ( )
inline

Gets streaming engine's state.

Returns
{Number} Returns streaming engine's state.

◆ getTimelineCurrentPosition()

NvsStreamingContext::getTimelineCurrentPosition (   timeline)
inline

Gets the current positon of the timeline (in microseconds)

Parameters
{NvsTimeline}timeline Timeline
Returns
{Number} Returns the current position of the timeline

◆ grabImageFromTimeline()

NvsStreamingContext::grabImageFromTimeline (   timeline,
  timestamp,
  proxyScale,
  flags 
)
inline

Gets the specific frame in timeline with a specific timestamp.

Parameters
{NvsTimeline}timeline The timeline that will be grabbed from.
{Number}timestamp The desired frame's timestamp(in microseconds). Timestamp should be within range [0,timeline.duration - 1]. Other inputs are invalid and will results grabImageFromTimeline returns null.
{NvsRational}proxyScale scale proxy
{Number}flags flags
Returns
{UIImage} Returns the frame's Bitmap object the timestamp corresponding to, returns null if grabbing frame failed.

◆ initHumanDetection()

NvsStreamingContext::initHumanDetection (   modelFilePath,
  licenseFilePath,
  features 
)
inline

Initializes human detection. Only once needed.

Parameters
{String}modelFilePath mode file path
{String}licenseFilePath license file path
{Number}features features, see NvsHumanDetectionFeatureEnum for detail
Returns
{Boolean} Returns a value representing if it succeeded.
See also
NvsStreamingContext#initHumanDetectionExt NvsStreamingContext#closeHumanDetection

◆ initHumanDetectionExt()

NvsStreamingContext::initHumanDetectionExt (   modelFilePath,
  licenseFilePath,
  features 
)
inline

Initializes human detection. Need use initHumanDetection first.

Parameters
{String}modelFilePath mode file path
{String}licenseFilePath license file path
{Number}features features, see NvsHumanDetectionFeatureEnum for detail
Returns
{Boolean} Returns a value representing if it succeeded.
See also
NvsStreamingContext#initHumanDetection NvsStreamingContext#setupHumanDetectionData

◆ isDecoderConfigSupported()

NvsStreamingContext::isDecoderConfigSupported (   codecType,
  codecAcceleration 
)
inline

Video decoder configuration is supported or not.

Returns
{Boolean} supported or not

◆ isDefaultCaptionFade()

NvsStreamingContext::isDefaultCaptionFade ( )
inline

caption default fade is enabled or not

Returns
{Boolean} enabled or not

◆ isUseChineseLanguageOnly()

NvsStreamingContext::isUseChineseLanguageOnly ( )
inline

Chinese language only or not.

Returns
{Boolean}

◆ loadProject()

NvsStreamingContext::loadProject (   projectId,
  resourceDir,
  flags = 0 
)
inline

Returns created timeline object.

Parameters
{String}projectId project uuid,project must be installed firstly
{String}resourceDir resource dir of the project asset
{Number}flags Special flags for create timeline. If there is no special requirements please input 0. Please refer to create timeline flag.
Returns
{NvsTimeline} Returns created timeline object

◆ notifyUpdateToWebReader()

NvsStreamingContext::notifyUpdateToWebReader (   webAVFilePath)
inline

update the notify to webReader

Parameters
{String}webAVFilePath web audio video file path
Returns
{Boolean}

◆ onSeekingTimelinePosition()

get NvsStreamingContext::onSeekingTimelinePosition ( )
inline

Current postion of timeline refer toking.

Parameters
{NvsTimeline}timeline
{String}position Returns current postion of timeline refer toking.
Returns
{Object}

◆ onStreamingEngineStateChanged()

get NvsStreamingContext::onStreamingEngineStateChanged ( )
inline

State change of streaming engine.

Returns
{Object}

◆ playbackTimeline()

NvsStreamingContext::playbackTimeline (   timeline,
  startTime,
  endTime,
  videoSizeMode,
  preload,
  flags 
)
inline

Timeline playback.

Parameters
{NvsTimeline}timeline Timeline
{Number}startTime Start time(in microseconds). Start time should be in the range [0,timeline.duration - 1], other inputs are invalid and playbackTimeline will return false resulting playback cannot be turned on.
{Number}endTime End time(in microseconds). If endtime input is a negative value, then the playback is defaultly set to play till the end.
{Number}videoSizeMode If no special requirements please input 0. Please refer to NvsVideoPreviewSizeModeEnum for reference.
{Boolean}preload Whether to preload
{Number}flags Flags for preview. If no special requirements please input 0. Please refer to NvsPlaybackFlagEnum for reference.
Returns
{Boolean} Returns a boolean value. Note: timeline playback is an asynchronous operation, it returns true if timeline playback can be turned on.

◆ playbackTimelineWithProxyScale()

NvsStreamingContext::playbackTimelineWithProxyScale (   timeline,
  startTime,
  endTime,
  proxyScale,
  preload,
  flags 
)
inline

playback timeline with proxy scale

Parameters
{NvsTimeline}timeline Timeline
{Number}startTime Start time(in microseconds). Start time should be in the range [0,timeline.duration - 1], other inputs are invalid and playbackTimeline will return false resulting playback cannot be turned on.
{Number}endTime End time(in microseconds). If endtime input is a negative value, then the playback is defaultly set to play till the end.
{NvsRational}proxyScale Zoom scale of proxy
{Boolean}preload Whether to preload
{Number}flags Flags for preview. If no special requirements please input 0. Please refer to NvsPlaybackFlagEnum for reference.
Returns
{Boolean} Returns BOOL value. Note: The timeline playback is an asynchronous operation. Returning YES will start the timeline playback, and NO will not.

◆ preloadEffectResources()

NvsStreamingContext::preloadEffectResources ( )
inline

preload effects resource

Returns
{Boolean}

◆ registerFontByFilePath()

NvsStreamingContext::registerFontByFilePath (   fontFilePath)
inline

Gets font file's fontFamily.

Parameters
{String}fontFilePath Font file path
Returns
{String} Returns font file's fontFamily information.

◆ registerLocalFile()

NvsStreamingContext::registerLocalFile (   file)
inline

Register a local File object.

Parameters
{File}file A File object to register.
Returns
{String} On success returns an non-empty string which represent the local file identifier.

◆ removeLiveWindow()

NvsStreamingContext::removeLiveWindow (   liveWindow)
inline

remvoe live window

Parameters
{NvsLiveWindow}liveWindow live window
Returns
{}

◆ removeTimeline()

NvsStreamingContext::removeTimeline (   timeline)
inline

Removes timeline.

Parameters
{NvsTimeline}timeline The timeline to be removed
Returns
{Boolean} Returns a boolean value. true means a successful remove, false means failure.

◆ seekTimeline()

NvsStreamingContext::seekTimeline (   timeline,
  timestamp,
  videoSizeMode,
  flags 
)
inline

Seeking the frame at a specific timestamp.

Parameters
{NvsTimeline}timeline Timeline
{Number}timestamp Timestamp (in microseconds). Timestamp should be in the range of [0,timeline.duration - 1]. Other input values are invalid and seekTimeline will return false, results can't targeting.
{Number}videoSizeMode Video preview mode. Please refer to NvsVideoPreviewSizeModeEnum.
{Number}flags Flags for streaming engine seeking. For specific please refer to NvsSeekFlagEnum.
Returns
{Boolean} Returns BOOL value. Note: Seeking to a timestamp is an asynchronous operation. A return value of YES means that seeking video startups successfully, otherwise it fails to startup.

◆ seekTimelineWithProxyScale()

NvsStreamingContext::seekTimelineWithProxyScale (   timeline,
  timestamp,
  proxyScale,
  flags 
)
inline

Seeking the frame at a specific timestamp with proxy scale.

Parameters
{NvsTimeline}timeline Timeline
{Number}timestamp Timestamp (in microseconds). Timestamp should be in the range of [0,timeline.duration - 1]. Other input values are invalid and seekTimeline will return false, results can't targeting.
{NvsRational}proxyScale Zoom scale of proxy
{Number}flags Flags for streaming engine seeking. For specific please refer to NvsSeekFlagEnum.
Returns
{Boolean} Returns BOOL value. Note: Seeking to a timestamp is an asynchronous operation. A return value of YES means that seeking video startups successfully, otherwise it fails to startup.

◆ setAudioOutputDeviceVolume()

NvsStreamingContext::setAudioOutputDeviceVolume (   volume)
inline

Set volume to audio output device.

Parameters
{Number}volume new volume to device, value range[0, 1]
Returns
{}

◆ setDefaultCaptionFade()

NvsStreamingContext::setDefaultCaptionFade (   fade)
inline

enable caption default fade

Parameters
{Boolean}fade enable fade or not
Returns
{}

◆ setMaxImageReaderCount()

NvsStreamingContext::setMaxImageReaderCount (   count)
inline

set max count of image reader

Parameters
{Number}count max count of image reader
Returns
{}

◆ setMaxVideoDecodingThreadCount()

NvsStreamingContext::setMaxVideoDecodingThreadCount (   count)
inline

set max count of video decoding thread

Parameters
{Number}count count
Returns
{}

◆ setMaxVideoFileReaderCount()

NvsStreamingContext::setMaxVideoFileReaderCount (   count)
inline

set max count of video file reader

Parameters
{Number}count max count of video file reader
Returns
{}

◆ setupHumanDetectionData()

NvsStreamingContext::setupHumanDetectionData (   dataType,
  dataFilePath 
)
inline

Setup human detection data.

Parameters
{Number}dataType data type of human detection, see NvsHumanDetectionDataTypeEnum for detail
{String}dataFilePath data file path
Returns
{Boolean} Returns a value representing if it succeeded.

◆ setUseChineseLanguageOnly()

NvsStreamingContext::setUseChineseLanguageOnly (   useChineseLanguageOnly)
inline

set Chinese language only

Parameters
{Boolean}useChineseLanguageOnly use Chinese language only
Returns
{}

◆ stop()

NvsStreamingContext::stop ( )
inline

Stops the engine.

Returns
{}

◆ streamingEngineReadyForTimelineModification()

NvsStreamingContext::streamingEngineReadyForTimelineModification ( )
inline

ready for modify timeline of streaming engine

Returns
{Promise} Promise

◆ unregisterLocalFile()

NvsStreamingContext::unregisterLocalFile (   localFileId)
inline

Unregister a local File object according to its identifier.

Parameters
{String}localFileId A string object of the local file object identifier to unregister.
Returns
{Boolean} Returns true on success.

◆ verifySdkLicenseFile()

NvsStreamingContext::verifySdkLicenseFile (   requestUrl,
  type = '' 
)
inline

Verifies the SDK license.

Parameters
{String}requestUrl request url
{String}type type
Returns
{Boolean} Returns the BOOL value. YES indicates that the authorization verification is successful, and NO indicates that it fails. If the verification fails, watermark will appear in the video preview. After using this API, onWebRequestAuthFinish callback need be implemented to listen the result of verification.

◆ verifySdkLicenseFileWithExtraUserData()

NvsStreamingContext::verifySdkLicenseFileWithExtraUserData (   requestUrl,
  extraUserData 
)
inline

verify sdk licence file with extra user data

Parameters
{String}requestUrl request url
{}extraUserData extra user data
Returns
{}

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