This article will introduce to you how to integrate real-time audio and video call functions into WeChat applet. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
Relevant learning recommendations: Mini Program Development Tutorial
In the development of the project, many times, we will have audio and video Generally speaking, we don’t write the call requirements ourselves, so we need to use a third party to achieve it. Especially in this project development, it is necessary to integrate the function of real-time audio and video calls into the WeChat applet. The real-time audio and video service of Tencent Cloud is used here.
Official real-time audio and video document: https://cloud.tencent.com/document/product/647
Document location: Documentation->Video Service->Real-time Audio and Video
The official document introduces the comparison in detail. Generally, it can be completed by following the steps, but you may also encounter certain problems.
If you want to use Tencent Cloud services, you need to register a Tencent Cloud account first. Log in to the Tencent Cloud console and enter the "Cloud Products->Video Service->Real-time Audio and Video" module. Then follow the one-minute steps to activate the service in the real-time audio and video document. There are 1,000 free minutes for the first activation, which can provide development testing. If the time is exceeded, charges will be required.
In the quick start, you can choose what device you want to use to make audio and video calls. Here, choose the applet .
You may encounter some problems in step 4
Want to integrate in the WeChat applet For the real-time audio and video function, the interface must be opened in the background of the WeChat applet. However, during the process of opening the interface, it was found that it could not be opened. The reason is that the current service category of the mini program does not meet the conditions for activating real-time audio and video.
Solution: Set the service class in "Settings->Basic Settings" in the WeChat applet background Head. If it is a test, you can choose "Tools>Video Customer Service". If you choose this, the advantage is that you don't need to upload the merchant's qualification certificate and you can test it directly. Then open the interface again and you will be successful.
After downloading the Demo, then fill in the SDKAPPID and SECRETKEY in the customization file to use it in the WeChat developer tools. Find two friends and use WeChat to scan the previewed QR code to make real-time audio and video calls.
Introduction to Programming! !
The above is the detailed content of How does the WeChat applet integrate real-time audio and video call functions?. For more information, please follow other related articles on the PHP Chinese website!