
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
rtc-beauty-plugin
Advanced tools
TRTC 可以通过插件,帮助开发者轻松实现基础美颜功能。用户可以调整美颜参数,实现自然的美颜效果。点击此处 体验美颜效果。
美颜插件支持以下浏览器:
不支持移动端设备和微信内嵌网页。
使用 RTCBeautyPlugin
时,请将 TRTC SDK 升级到 4.11.1 及以上版本。
在项目中安装 RTCBeautyPlugin 插件。
npm install rtc-beauty-plugin
一个 RTCBeautyPlugin 实例只能用来处理一条本地音视频流。
const rtcBeautyPlugin = new RTCBeautyPlugin();
const beautyStream = rtcBeautyPlugin.generateBeautyStream(localStream);
// 发布经过美颜后的流
await client.publish(beautyStream);
将 localStream 处理成经过美颜后的 beautyStream。
// 初始化美颜插件
const rtcBeautyPlugin = new RTCBeautyPlugin();
await localStream.initialize();
// 生成美颜处理后的流
const beautyStream = rtcBeautyPlugin.generateBeautyStream(localStream);
// 发布经过美颜后的流
await client.publish(beautyStream);
功能: 调节美颜插件的美颜程度。
Name | Type | Description |
---|---|---|
beauty | number | 美颜度( 0 - 1 ,默认为 0.5 ) |
brightness | number | 明亮度( 0 - 1 ,默认为 0.5 ) |
ruddy | number | 红润度( 0 - 1 ,默认为 0.5 ) |
beautyPlugin.setBeautyParam({ beauty: 0.5, brightness: 0.5, ruddy: 0.5 });
功能: 销毁美颜插件。
使用方式: 在推流结束之后,可以销毁美颜插件,避免内存占用和性能消耗。
await client.leave();
beautyPlugin.destroy();
一个 RTCBeautyPlugin
实例只能处理一条本地流。
使用 replaceTrack
等操作会导致您的 localStream
美颜效果消失,请酌情使用。
FAQs
rtc-beauty-plugin for TRTC SDK
We found that rtc-beauty-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.