TUILiveKit Release Notes
Live SDK Release Notes
BaseBeautyStore is the module in AtomicXCore responsible for managing basic portrait beautification effects. This module enables you to easily add natural beautification features to your live streaming or video calling applications.Core Concept | Type | Core Responsibilities and Description |
BaseBeautyState | struct | Represents the current state of the basic beautification module. Contains the currently applied intensity values for smoothing (smoothLevel), whitening (whitenessLevel), and rosy (ruddyLevel). |
BaseBeautyStore | class | The core management class for interacting with basic beautification features. Implemented as a global singleton ( shared). Responsible for setting parameters, resetting effects, and synchronizing state across the app. |
BaseBeautyStore and subscribe to receive real-time updates of the current beautification parameter state.BaseBeautyStore.shared() to access the global instance.baseBeautyStore.baseBeautyState to receive real-time updates of BaseBeautyState.import Foundationimport AtomicXCoreimport Combineclass BeautyManager {// 1. Get the singleton instanceprivate let baseBeautyStore = BaseBeautyStore.sharedprivate var cancellables = Set<AnyCancellable>()// Expose beauty status externallylet beautyStatePublisher = CurrentValueSubject<BaseBeautyState, Never>(BaseBeautyState())init() {// 2. Subscribe to the statesubscribeToBeautyState()}private func subscribeToBeautyState() {baseBeautyStore.state.subscribe().receive(on: DispatchQueue.main).assign(to: \\.value, on: beautyStatePublisher).store(in: &cancellables)}// ... Subsequent methods}
UISlider). [0, 9], where 0 means the effect is off, and 9 means the effect is most prominent. You need to map the UI control value (e.g., 0.0 - 1.0 for a UISlider) to the 0 - 9 range.setSmoothLevel(smoothLevel:), setWhitenessLevel(whitenessLevel:), and setRuddyLevel(ruddyLevel:) to set the smoothing, whitening, and rosy intensities.extension BeautyManager {/// Set the smoothing level (Input range 0.0 ~ 1.0, converted internally to 0 ~ 9)func updateSmoothLevel(uiLevel: Float) {// Map UI's 0.0 ~ 1.0 to SDK's 0 ~ 9let sdkLevel = uiLevel * 9.0baseBeautyStore.setSmoothLevel(smoothLevel: sdkLevel)}/// Set the whitening level (Input range 0.0 ~ 1.0, converted internally to 0 ~ 9)func updateWhitenessLevel(uiLevel: Float) {let sdkLevel = uiLevel * 9.0baseBeautyStore.setWhitenessLevel(whitenessLevel: sdkLevel)}/// Set the rosiness level (Input range 0.0 ~ 1.0, converted internally to 0 ~ 9)func updateRuddyLevel(uiLevel: Float) {let sdkLevel = uiLevel * 9.0baseBeautyStore.setRuddyLevel(ruddyLevel: sdkLevel)}}
baseBeautyStore.reset() method.extension BeautyManager {/// Reset all basic beauty effectsfunc resetBeautyEffects() {baseBeautyStore.reset()}}
Comparison Item | Basic Beautification (BaseBeautyStore) | Advanced Beautification (TEBeautyKit) |
Core Features | Smoothing, Whitening, Rosy | Includes all basic features, plus V-shape face, eye distance adjustment, nose slimming, 3D stickers, filters, makeup, and more |
Pricing | Free (included in AtomicXCore license) | Paid (Requires separate license) |
Integration | Built-in by default; use BaseBeautyStore.shared() directly | Requires additional integration of the TEBeautyKit component and authentication |
Recommended Scenarios | Scenarios with basic beautification needs and rapid implementation requirements | Scenarios requiring advanced beautification, shaping, stickers, filters, and other premium features |
Store/Component | Description | API Reference |
LiveCoreView | Core view component for displaying and interacting with live video streams. Handles video rendering and view widgets, supports host streaming, audience co-hosting, host connections, and more. | |
DeviceStore | Controls audio/video devices: microphone (on/off, volume), camera (on/off, switch, quality), screen sharing, and real-time device status monitoring. | |
BaseBeautyStore | Basic beauty filters: adjust smoothing/whitening/rosiness (0-100), reset beauty status, and synchronize effect parameters. |
TEBeautyKit, BaseBeautyStore APIs may be overridden. Use the TEBeautyKit APIs instead.Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários