ByteRTCVideoEffect class

Inheritance
  • Object
  • NativeClass
  • ByteRTCVideoEffect

Constructors

ByteRTCVideoEffect([NativeClassOptions? options])

Properties

$resource → NativeResource
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
ready Future<void>
Whether the instance is initialized
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

appendEffectNodes(NSArray<NSString> effectNodes) FutureOr<int>
@hidden for internal use only @detail api @author zhushufan.ref @brief Appends video effects material package. @param effectNodes Array of effect material package paths. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions. @note This API adds new video effect to the video effect you set with setEffectNodes:{@link #ByteRTCVideoEffect#setEffectNodes}.
applyStickerEffect(NSString stickerPath) FutureOr<int>
@hidden for internal use only @detail api @author zhushufan.ref @brief Private method
Set video effects material package. @param stickerPath effect material package path.
To remove the current video effect, set it to null. @return - 0: Success - 1000: The Effect SDK is not integrated. - 1001: This API is not available for your Effect SDK. - <0: Other errors. See Error Code Table. @note Before calling this method, you must first call enableVideoEffect{@link #ByteRTCVideoEffect#enableVideoEffect}.
destroy() → void
inherited
disableFaceDetection() FutureOr<int>
@detail api @author wangjunlin.3182 @brief Stops face detection. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions.
disableVideoEffect() FutureOr<int>
@detail api @author zhushufan.ref @brief Disables video effects. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions. @note Call enableVideoEffect{@link #ByteRTCVideoEffect#enableVideoEffect} to enable video effects.
disableVirtualBackground() FutureOr<int>
@detail api @author wangjunlin.3182 @brief Turns off the virtual background. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions. @note After calling enableVirtualBackground:withSource:{@link #ByteRTCVideoEffect#enableVirtualBackground:withSource} to enable the virtual background function, you can call this API to turn it off.
enableFaceDetection(id<ByteRTCFaceDetectionObserver> observer, NSUInteger interval, NSString path) FutureOr<int>
@detail api @author wangjunlin.3182 @brief Starts face detection and registers the observer for the result.
With this observer, you will receive onFaceDetectResult:{@link #ByteRTCFaceDetectionObserver#onFaceDetectResult} periodically. @param observer See ByteRTCFaceDetectionObserver{@link #ByteRTCFaceDetectionObserver}. @param interval The minimum time interval between two callbacks in milliseconds. The value should be greater than 0. The actual time interval is between interval and interval+the time slot of a captured video frame. @param path The absolute path of the face detection algorithm file. Typically it is the tt_face_vXXX.model file in the ttfacemodel folder. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - -1004: Initializing. This function will be available when the initialization is completed. - < 0: Other error. See error code table for specific instructions.
enableVideoEffect() FutureOr<int>
@detail api @author zhushufan.ref @brief Enables video effects including beauty and color filters. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions. @note - You must call initCVResource:withAlgoModelDir:{@link #ByteRTCVideoEffect#initCVResource:withAlgoModelDir} before calling this API. - This API does not turn on video effects directly, you must call setEffectNodes:{@link #ByteRTCVideoEffect#setEffectNodes} or setColorFilter:{@link #ByteRTCVideoEffect#setColorFilter} next. - Call disableVideoEffect{@link #ByteRTCVideoEffect#disableVideoEffect} to turn off video effects.
enableVirtualBackground(NSString backgroundStickerPath, ByteRTCVirtualBackgroundSource source) FutureOr<int>
@detail api @author zhushufan.ref @brief Sets the original background to a specified image or a solid color. @param backgroundStickerPath The absolute path of virtual background effects. @param source Virtual background source. See ByteRTCVirtualBackgroundSource{@link #ByteRTCVirtualBackgroundSource}. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions. @note - You must call initCVResource:withAlgoModelDir:{@link #ByteRTCVideoEffect#initCVResource:withAlgoModelDir} before calling this API. - Call disableVirtualBackground{@link #ByteRTCVideoEffect#disableVirtualBackground} to turn off the virtual background.
getAuthMessage(NSString ppmsg) FutureOr<int>
@detail api @author zhushufan.ref @brief Get authorization messages from the Effect SDK for the online license. @param ppmsg Authorization message string address @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See Error Code Table for specific instructions. @note - You must get an online license for the Effect SDK before using the CV functions. - After getting authorization messages with this API, implement the code of getting the online license with Online License Guide. Then call initCVResource:withAlgoModelDir:{@link #ByteRTCVideoEffect#initCVResource:withAlgoModelDir} to validate the license. After that, you can use the CV function.
getVideoEffectHandle() FutureOr<void>
@hidden for internal use only @detail api @author zhushufan.ref @brief Return video effect handle. Private method
initCVResource(NSString licenseFile, NSString algoModelDir) FutureOr<int>
@detail api @author zhushufan.ref @brief Checks video effect license, sets the video effect resource model path, and initializes video effect. @param licenseFile The absolute path of the license file for authorization. @param algoModelDir The absolute path of the Effects SDK's models file. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions. @note When validating the license, the difference of the timestamp of the CV server and the timestamp of the client is checked. You must not change the time of the client.
nativeCall<T>(String method, [List? args, NativeMethodMeta? meta]) Future<T>
Call instance method
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEffectNodes(NSArray<NSString> effectNodes) FutureOr<int>
@hidden for internal use only @detail api @author zhushufan.ref @brief Removes the designated video effects material package. @param effectNodes Array of effect material package paths. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions. @note Removes the designated video effects in setEffectNodes:{@link #ByteRTCVideoEffect#setEffectNodes} or appendEffectNodes:{@link #ByteRTCVideoEffect#appendEffectNodes}.
sendInstanceGet<T>(String property) Future<T>
Get instance property
inherited
sendInstancePropertiesGet(dynamic nativeClass) Future<Map<String, dynamic>>
Get instance properties
inherited
sendInstanceSet(String property, dynamic value) Future<void>
Set instance property
inherited
setColorFilter(NSString filterRes) FutureOr<int>
@detail api @author zhushufan.ref @brief Sets the color filter. @param filterRes Filter effects package absolute path. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions. @note Call setColorFilterIntensity:{@link #ByteRTCVideoEffect#setColorFilterIntensity} to set the intensity of the color filter enabled. Set the intensity to 0 to turn off color filter.
setColorFilterIntensity(float intensity) FutureOr<int>
@detail api @author zhushufan.ref @brief Sets the intensity of the color filter enabled. @param intensity Filter intensity. The value range 0,1 is set to be invalid when the range is exceeded.
Set the intensity to 0 to turn off color filter. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions.
setEffectNodes(NSArray<NSString>? effectNodes) FutureOr<int>
@detail api @author zhushufan.ref @brief Sets the video effects material package. @param effectNodes Array of effect material package paths.
To remove the current video effect, set it to null. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions. @note You must call enableVideoEffect{@link #ByteRTCVideoEffect#enableVideoEffect} before calling this API.
setVideoEffectExpressionDetect(ByteRTCExpressionDetectConfig config) FutureOr<int>
@hidden for internal use only @detail api @author zhushufan.ref @brief Sets the configuration for video effects expression detection. @param config Expression detection configuration. See ByteRTCExpressionDetectConfig{@link #ByteRTCExpressionDetectConfig}. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions.
toString() String
A string representation of this object.
inherited
updateEffectNode(NSString node, NSString key, float value) FutureOr<int>
@detail api @author zhushufan.ref @brief Sets the intensity of video effects. @param node The absolute path of the effects resource package, see Resource Package Structure. @param key The name of the material key to be set, see Functions of Resource Keys for the value. @param value The intensity value that needs to be set, the value range 0,1, and the setting is invalid when it exceeds the range. @return - 0: Success. - –1000: The Effects SDK is not integrated. - –1001: This API is unavailable for your Effects SDK. - –1002: Your Effects SDK's version is incompatible. - < 0: Other error. See error code table for specific instructions.
updateResource(NativeResource resource) → void
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

codegen_$namespace → dynamic
no setter