npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kivisense/agora-beautify

v1.0.3

Published

>提供了视频美颜和视频画面亮度调节功能。是[声网web](https://doc.shengwang.cn/doc/rtc/javascript/get-started/quick-start)插件,需要集成在声网Web的SDK中使用。可以在[Demo](https://meta.kivisense.com/agora-kivi-plugin-demo/index.html)查看具体美颜效果。[Demo源码](https://github.com/kivisense/agora-beautify-plug

Downloads

1

Readme

@kivisense/agora-beautify

提供了视频美颜和视频画面亮度调节功能。是声网web插件,需要集成在声网Web的SDK中使用。可以在Demo查看具体美颜效果。Demo源码

使用方法

1. 添加npm包

npm i @kivisense/agora-beautify --save
// 如果您的项目中还未添加声网的sdk,则执行以下命令添加
npm i agora-rtc-sdk-ng --save

2. 使用插件

import AgoraRTC from "agora-rtc-sdk-ng";
import KiviBeautifyExtension from "@kivisense/agora-beautify";

const videoExtension = new KiviBeautifyExtension();

// 注册插件
AgoraRTC.registerExtensions([videoExtension]);

// 创建美颜插件的处理器
const processor = videoExtension.createProcessor();

// 使用声网sdk创建视频
const videoTrack = await AgoraRTC.createCameraVideoTrack();

// 设置视频的处理管道
videoTrack.pipe(processor).pipe(videoTrack.processorDestination);

// 启用美颜插件
processor.enable();

// 设置美颜插件的参数
processor.setOptions({
  beautifyEnabled: true, // 启用美颜功能
  brightnessEnabled: true, // 启用调节亮度功能
  brightness: 0.5, // 画面亮度,0.5表示不调节,范围:0 - 1,
  beautifyStyle: 2, // 美颜风格
})

// 在HTML元素上播放视频
videoTrack.play(document.querySelector('#video-container'));

3. 其他

上述代码仅在本地内网域名(localhost, 127.0.0.1, 192.168.0.*)有效。如需在其他域名使用,请联系[email protected] (并注明标题:“声网美颜”)

API

KiviBeautifyExtension

美颜插件类

Methods

createProcessor() 创建一个插件处理器,返回KiviVideoProcessor实例

KiviVideoProcessor

视频处理类

Methods enable() 启用插件

disable() 关闭插件

setOptions(options) 设置插件相关配置

options参数说明:

|参数名|默认值|参数类型|描述| |-|:-|:-|:-| |beautifyEnabled | true | Boolean | 启用美颜功能| |beautifyStyle | 1 | Number | 美颜风格: 1: Beautify 2: Moonlight 3: Sienna 4: Villa 5: Linen 6: Honey 7: Marine 8: Sable 9: VintageFilm 10: Hongkong 11: River 12: Dusk| |brightnessEnabled | true | Boolean | 启用调节亮度功能 | |brightness | 0.5 | Number | 画面亮度,0.5表示不调节,范围:0 - 1|

注意

Safari浏览器版本需要大于 15 才能有美颜效果