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

tencentcloud-webar

v1.0.23

Published

[English](#documentation) | [简体中文](#文档) # Documentation The main function of this SDK is to provide you with fast and secure access to [Web AR Face Filters](https://trtc.io/document/50099?platform=web&product=beautyar), and to use all features.

Downloads

522

Readme

English | 简体中文

Documentation

The main function of this SDK is to provide you with fast and secure access to Web AR Face Filters, and to use all features.

Process Description

The SDK implements a concise and non-invasive interface for access. You only need to initialize the instance and add the rendering node to your page to quickly achieve Web Beauty Effects functionality. Process Diagram

Installation

This SDK provides SDKs for the Web and WeChat Mini Programs using npm packages.

npm install tencentcloud-webar

SDK Integration

We provide two initialization methods: Built-in Camera and Custom Stream.

  • Built-in Camera and Player: Utilizes built-in camera and player encapsulation, with simple and rapid invocation.
  • Custom Stream Integration: Suitable for scenarios where there is a need to maintain media streams or require higher flexibility and controllability.

Setting Beauty and Effects

All materials of the SDK are compatible with both WeChat Mini Program and Web, with consistent calling methods. For details, please refer to Setting Beauty and Effects.

Using Portrait Segmentation (Virtual Background)

Achieve virtual background effects with portrait segmentation capability. For details, please refer to Using Portrait Segmentation (Virtual Background).

Using Animoji and Virtual Avatars

Animoji expressions and VR virtual avatar functions. For details, please refer to Using Expressions and Virtual Avatars.

Parameter and Method Description

Refer to the API Documentation.

Compatibility

| Browser | Supported Platforms | | ----- | --- | | Chrome | Desktop, Android, iOS | | Safari | Desktop, Android, iOS | | FireFox | Desktop, Android, iOS | | QQ webview | Android | | WeChat webview | Android/iOS WeChat 8.0.16 and above | | WeChat Mini Program | Android/iOS WeChat 8.0.16 and above |

For more platform compatibility information, please refer to Product Overview - Web.

Code Examples

Please refer to Quick Start.

文档

本 SDK 主要功能在于提供给您快速、安全地接入 Web 美颜特效,并使用所有功能。

流程说明

SDK 实现了简洁低侵入性的接口提供接入,您只需要初始化实例,将渲染节点添加到自己的页面即可快速实现 Web 美颜特效功能。 流程图

安装

本SDK使用npm包提供Web端与微信小程序的SDK。

npm install tencentcloud-webar

接入 SDK

本 SDK 在微信小程序和 Web 端的初始化方式略有差异。

  • 小程序接入请参见 小程序端接入
  • Web 端我们提供了内置 Camera 与自定义流两种初始化方式。
    • 内置相机与播放器:使用了内置的摄像头与播放器封装,调用简单迅速。
    • 自定义流接入:适用于有自己维护媒体流的需求或者要求更高的灵活性与可控性的场景。

设置美颜和特效

SDK 的所有素材均兼容微信小程序端与 Web 端,调用方式一致,详情可参见 设置美颜和特效

使用人像分割(虚拟背景)

借助人像分割能力实现虚拟背景效果,详情可参见 使用人像分割(虚拟背景)

使用表情和虚拟形象

Animoji 表情和 VR 虚拟形象功能,详情可参见 使用表情和虚拟形象

参数与方法说明

参见 API文档

兼容性

| 浏览器 | 支持平台 | | ----- | --- | | Chrome | 桌面端、Android、iOS | | Safari | 桌面端、Android、iOS | | FireFox | 桌面端、Android、iOS | | QQ webview | Android | | 微信 webview | Android/iOS 微信8.0.16以上| | 微信小程序 | Android/iOS 微信8.0.16以及上|

更多平台兼容相关信息,请参考 产品概述 - Web 端

代码实例

请参见 快速上手