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

call-engine-test

v1.3.4

Published

tuicall-engine-webrtc 是基于腾讯云 [即时通信 IM](https://cloud.tencent.com/document/product/269/42440) 和 [实时音视频 TRTC](https://cloud.tencent.com/document/product/647/16788) 两项付费 PaaS 服务构建出的音视频通信组件,支持双人和多人场景下的音视频通话。

Downloads

2

Readme

腾讯云实时音视频通话 tuicall-engine-webrtc

tuicall-engine-webrtc 是基于腾讯云 即时通信 IM实时音视频 TRTC 两项付费 PaaS 服务构建出的音视频通信组件,支持双人和多人场景下的音视频通话。

接入方式

安装依赖地址:

npm i trtc-js-sdk --save
npm i tim-js-sdk --save
npm i tsignaling --save
npm i tuicall-engine-webrtc --save

import { TUICallEngine, TUICallEvent } from "tuicall-engine-webrtc"

let options = {
  SDKAppID: 0, // 接入时需要将0替换为您的云通信应用的 SDKAppID
  tim: tim // tim 参数适用于业务中已存在 TIM 实例,为保证 TIM 实例唯一性
};

let tuiCallEngine = TUICallEngine.createInstance(options);

参数说明

  • SDKAppID:云通信应用的 SDKAppID。
  • tim:非必填项,若您没有,将会由内部代码自动创建。

API list

| API | 含义 | | :-------------------------------- | :----------------- | | createInstance (params) | 初始实例 | | destroyInstance () | 销毁实例 | | on(eventName, callback, context) | 监听事件 | | off(eventName, callback, context) | 取消监听事件 | | login(params) | 登录 | | logout() | 登出 | | call(params) | 邀请通话 | | groupCall(params) | 邀请群通话 | | accept(params) | 接受通话邀请 | | reject(params) | 拒绝通话邀请 | | hangup() | 挂断 | | startRemoteView(params) | 启动远端画面渲染 | | stopRemoteView(params) | 停止远端画面渲染 | | startLocalView(params) | 启动本地画面渲染 | | stopLocalView(params) | 停止本地画面渲染 | | openCamera() | 启动摄像头 | | closeCamera() | 关闭摄像头 | | openMicrophone | 设备麦克风是否静音 | | closeMicrophone | 设备麦克风是否静音 | | setVideoQuality(profile) | 设置视频质量 | | switchCallMediaType(newMediaType) | 当前通话类型切换 | | getDeviceList(deviceType) | 获取设备列表 | | switchDevice() | 切换摄像头或麦克风设备 |

event list

| event | 含义 | | :----------------------------------------------- | :------------------------ | | TUICallEvent.INVITED, | 收到邀请通知 | | TUICallEvent.REJECT, | 被邀用户拒绝通话 | | TUICallEvent.NO_RESP, | 被邀用户超时无应答 | | TUICallEvent.LINE_BUSY, | 被邀用户正在通话中,忙线 | | TUICallEvent.CALLING_CANCEL, | 本次通话被取消了 | | TUICallEvent.CALLING_TIMEOUT, | 本次通话超时未应答 | | TUICallEvent.CALLING_END, | 本次通话结束 | | TUICallEvent.USER_ENTER, | 用户进入通话 | | TUICallEvent.USER_LEAVE, | 用户离开通话 | | TUICallEvent.KICKED_OUT, | 重复登录,被踢出 | | TUICallEvent.USER_VIDEO_AVAILABLE, | 远端用户开启/关闭了摄像头 | | TUICallEvent.USER_AUDIO_AVAILABLE, | 远端用户开启/关闭了麦克风 | | TUICallEvent.SDK_READY, | SDK 进入 ready 状态 | | TUICallEvent.SDK_NOT_READY, | SDK 没有 ready 状态 | | TUICallEvent.GROUP_CALL_INVITEE_LIST_UPDATE | 群聊更新邀请列表 | | TUICallEvent.CALL_TYPE_CHANGED | 通话类型切换 | | TUICallEvent.DEVICED_UPDATED | 设备列表更新 |

Error code

| code | 错误类型 | 含义 | | :----------------- | :---------------- | :------------------------------ | | 60001 | 方法调用失败 | switchToAudioCall 调用失败 | | 60002 | 方法调用失败 | switchToVideoCall 调用失败 | | 60003 | 权限获取失败 | 没有可用的麦克风设备 | | 60004 | 权限获取失败 | 没有可用的摄像头设备 | | 60005 | 权限获取失败 | 用户禁止使用设备 | | 60006 | 环境检测失败 | 当前环境不支持webRTC |

参考文档