A list,
Small program live is a live program component provided by wechat for small program developers. By calling this component, merchants can implement live streaming in applets. At present, there is no access charge, and the function of live broadcasting can be realized quickly, and the self-generated flow loop does not need external drainage.
Two, how to open
Log in to “Mini Program Background” (mp.weixin.qq.com), find “Mini Program – Function – Live broadcast” in the left navigation bar, and click Open. If the following conditions are met, the live streaming of small programs can be opened: ① It belongs to the open category of live streaming of small programs, for details, see “Requirements for Admission of Live Streaming function of Wechat Small Programs” ② The main small programs have not violated any serious rules in the last half year; (3) The mini program has paid in the past 90 days;
Third, how to access the least development
1. Support the introduction of live-player-plugin code package of [Live component] in the main package or subpackage (note: Live component is not included in the code package volume), referenced in app.json of the project root directory, sample code is as follows:
"Plugins ": {"live-player-plugin": {"version": "1.2.7", // Please fill in the latest version number of the livestreaming component "provider": "Wx2b03c6e691cd7370" // Must fill in the live component appID}}Copy the code
2. Connect to wechat official [Obtaining Live Room List] API in the background to get ids, covers and other information of all live rooms and send it back to the front end.
3. The interface between the front end and the background can obtain the list of live broadcast rooms and display the front end. Users can click a live broadcast room and directly jump to the page of live broadcast components through the link address (that is, enter the page of live broadcast room).
NavigateTo ({url: wx) {let roomId = [live roomId]; `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin? room_id=${roomId}&custom_params=${customParams}`})Copy the code