Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small program media component void-room


May 18, 2021 WeChat Mini Program Development Document


Table of contents


voip-room

The base library 2.11.0 starts to support, and the lower version needs to be compatible.

Multiplayer audio and video conversations. U ser authorization is required to scope.camera, scope.record. Related: wx.joinVoIPChat

Temporarily only for domestic subjects for the following types of purposes of small programs open, need to first pass the category audit, and then in the small program management background, "development" - "interface settings" in the self-service to open the component permissions.

Level 1 class/body type Secondary class Small program content scene
Education Online video courses Online classes, online training, lectures and other educational live broadcasts
Medical Internet hospitals, public hospitals Live coverage of consultations, large-scale health talks, etc
Medical Private medical institutions /
Financial Banking, trusts, funds, securities/futures, securities, futures investment consulting, insurance, credit services, new three-board information service platform, stock information service platform (Hong Kong stocks/US shares), consumer finance Financial products video customer service claims, financial products promotion live, etc
Car Car pre-sale service Car pre-sale, promotion of live broadcast
The main government account number / Government-related work to promote live broadcast, leadership speech live, etc
IT technology Multiparty communication Online meetings
IT technology Hardware devices Smart hardware

When the component permission is opened, the developer can obtain the openid of the room member and pass it to the voip-room component to display the membership screen after joinVoIPChat is successful.

Property Type The default Required Description The lowest version
openid string Yes Enter room users OpenID 2.11.0
mode string camera no Dialog window type, it is incoming to Camera, other users are incompatible VIDEO 2.11.0
device-position string front no Effective, front or rear only when Mode is Camera, value front , back 2.11.0
binderror eventhandle no Creating a dialog window fails 2.11.0

Bug & Tip

  1. TIP: Do not support the developer tool
  2. Tip: Please pay attention to the use of native components

The sample code

<block wx:for="{{openIdList}}" wx:key="*this">
  <voip-room
    openid="{{item}}"
    mode="{{selfOpenId === item ? 'camera' : 'video'}}">
  </voip-room>
</block>