
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
tuicall-engine-wx
Advanced tools
TUICallEngine API 是 无 UI 音视频通话接口。如果带 UI TUICallKit 组件 的交互不满足您的需求,您可以使用 TUICallEngine 接口自己封装交互。 由于小程序开发的限制,需要先给 live-pusher 绑定事件,具体可以参照 TUICallKit。
npm:
npm install tuicall-engine-wx;
yarn:
yarn add tuicall-engine-wx;
使用
import TUICallEngine, { EVENT } from "tuicall-engine-wx";
const options = {
sdkAppID: 0, // 接入时需要将 0 替换为您的云通信应用的 SDKAppID
tim: tim, // tim 参数适用于业务中已存在 TIM 实例,为保证 TIM 实例唯一性。非必填
}
wx.$TUICallEngine = TUICallEngine.createInstance(options);
wx.$TUICallEngine.on(EVENT.INVITED, () => {});
API | 描述 |
---|---|
createInstance | 创建 TUICallEngine 实例(静态方法) |
destroyInstance | 销毁 TUICallEngine 实例(静态方法) |
on | 增加事件监听 |
off | 取消事件监听 |
API | 描述 |
---|---|
call | 发起 1v1 通话 |
accept | 接听通话 |
reject | 拒绝通话 |
hangup | 结束通话 |
switchCallMediaType | 切换通话媒体类型,比如视频通话切音频通话 |
API | 描述 |
---|---|
openCamera | 开启摄像头 |
closeCamera | 关闭摄像头 |
switchCamera | 切换前后摄像头 |
openMicrophone | 打开麦克风 |
closeMicrophone | 关闭麦克风 |
selectAudioPlaybackDevice | 选择音频播放设备(听筒/扬声器) |
API | 描述 |
---|---|
setSelfInfo | 设置用户的头像、昵称 |
setLogLevel | 设置日志级别,低于 level 的日志将不会输出 |
事件名 | 说明 |
---|---|
INVITED | 被邀请通话 |
USER_ACCEPT | 用户接听 |
USER_ENTER | 用户进入通话 |
USER_LEAVE | 用户离开通话 |
USER_UPDATE | 用户更新 |
REJECT | 用户拒绝通话 |
NO_RESP | 用户无响应 |
LINE_BUSY | 用户忙线 |
CALLING_CANCEL | 通话被取消 |
CALL_END | 通话结束 |
SDK_READY | SDK Ready 回调 |
KICKED_OUT | 被踢下线 |
CALL_MODE | 切换通话模式 |
FAQs
TUICallEngine miniProgram
The npm package tuicall-engine-wx receives a total of 57 weekly downloads. As such, tuicall-engine-wx popularity was classified as not popular.
We found that tuicall-engine-wx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.