c#背单词小程序视频_微信小程序 多人音视频对话

本文介绍了如何在微信小程序中实现多人音视频对话功能,包括开通权限、调用流程、前端接口使用、签名算法以及人数和频率限制。重点讲解了wx.joinVoIPChat接口和云开发中的签名计算。
摘要由CSDN通过智能技术生成

多人音视频对话

用于实现小程序内多人音视频对话的功能。

申请开通

小程序管理后台,「开发」-「接口设置」中自助开通该组件权限。相关接口 wx.joinVoIPChat 和组件 voip-room。

调用流程

开发者仅需提供房间唯一标识,即可加入到指定的房间。传入相同唯一标识的用户,会进到相同的房间。为了保证前端传入的 groupId 可信,wx.joinVoIPChat 接口要求传入签名。详见下文 签名算法。当加入视频房间时,可结合 voip-room 组件显示成员画面。

前端接口

  • 创建/加入房间:wx.joinVoIPChat

  • 离开房间:wx.exitVoIPChat

  • 更新房间麦克风/耳机静音设置:wx.updateVoIPChatMuteConfig

  • 监听房间成员变化:wx.onVoIPChatMembersChanged

  • 监听房间成员通话状态变化:wx.onVoIPChatSpeakersChanged

  • 监听通话中断:wx.onVoIPChatInterrupted

  • 监听实时语音通话成员视频状态变化:wx.onOnVoIPVid

VoIPDemo is intended as a sample to show how to use the RTC API for Windows CE, but also as a working application for demonstration and use (taking note of the limitations described below). Limitiations ============= Currently supports 1 IM and/or 1 voice call at a time. 1 Voice call limitation due to RTC spec. 1 IM call simplifies event handling + need for multiple session windows Simultaneous voice and IM calls are only allowed from one source, currently identified by SIP URI. Callback functionality is currently not implemented. Component Requirements ====================== SYSGEN_VOIP will bring in all the components required by VoIPDemo. The target device needs to have audio capture and play capabilities and a network interface. Overview of program flow and source ==================================== VoIPDemo is separated into three main functional parts: User Interface, use of the RTC API (including RTC event handling), and the code to interface between RTC and the UI. The intent of this quasi- layering approach is to limit the direct hooks from the RTC backend to the UI and make it easier to re-use the RTC code in a different UI. The program goes through the following phases: Window Initialization RTC Initialization Main Message Loop RTC Termination Window Termination The main message loop manages all main window UI related messages and events. This includes contact list changes by the user, UI for call placement, etc. When the main window finishes its setup of an outgoing call, it calls the SessionWindow Callback to actually initiate the call. The SessionWindow is where all voice and IM session UI takes place. It is called directly by our RTC event handler to display call/IM status information, notify the user of incoming calls/messages, parse user input for outgoing messages, and calls the interface code to initi
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值