Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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
The npm package rtc-beauty-plugin receives a total of 22 weekly downloads. As such, rtc-beauty-plugin popularity was classified as not popular.
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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.