May 18, 2021 WeChat Mini Program Development Document
Base library 1.7.0 starts to support, and low versions need to be compatible.
Live audio and video recording (v2.9.1 supports same-layer rendering). Users are required to authorize scope.camera, scope.record.
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 |
---|---|---|
Social | Live | Involved in the nature of entertainment, such as live star, live life anecdotes, pet live, etc. Select this category after the first submission code review, need to be approved by the local Internet authority confirmation, the estimated length of review is about 7 days |
Education | Online video courses | Online classes, online training, lectures and other educational live broadcasts |
Medical | Internet hospitals, public medical institutions, private medical institutions | Live coverage of consultations, large-scale health talks, etc |
Financial | Banking, trusts, public funds, private equity funds, securities/futures, securities, futures investment consulting, insurance, credit business, the new three-board information service platform, stock information service platform (Hong Kong stock/ U.S. stock), 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 |
Tools | Video customer service | One-to-one video customer service that does not involve the above categories of content, such as after-sales one-to-one video service |
IT Technology | Multi-communication | Provide multi-party conference calls / video conferencing |
Related API: wx.createlivePusherContext
Attributes | type | Defaults | Required | illustrate | Minimum version |
---|---|---|---|---|---|
url | string | no |
Billing address.Currently only support
rtmp
Format
|
1.7.0 | |
mode | string | Rtc | Whether |
SD
(SD),
HD
(HD),
FHD
(Ultra Clear),
RTC
(Live Call)
|
1.7.0 |
autopush | boolean | false | Whether | Push the stream automatically | 1.7.0 |
muted | boolean | false | Whether |
Whether to mute.
It's about to be discarded
enable-mic
|
1.7.0 |
enable-camera | boolean | true | Whether | Turn on the camera | 1.7.0 |
auto-focus | boolean | true | Whether | Auto-aggregation | 1.7.0 |
orientation | string | vertical | Whether | The orientation of the screen | 1.7.0 |
beauty | number | 0 | Whether | Beauty, value range 0-9, 0 for off | 1.7.0 |
whiteness | number | 0 | Whether | Whitening, value range 0-9, 0 for off | 1.7.0 |
aspect | string | 9:16 | Whether |
Aspect ratio with optional values
3:4
9:16
|
1.7.0 |
min-bitrate | number | 200 | Whether | Minimum code rate | 1.7.0 |
max-bitrate | number | 1000 | Whether | Maximum code rate | 1.7.0 |
audio-quality | string | high | Whether |
High sound quality (48KHz) or bass (16KHz) with values
high
and
low
|
1.7.0 |
waiting-image | string | Whether | Push the wait screen as you enter the background | 1.7.0 | |
waiting-image-hash | string | Whether | Wait for the MD5 value of the screen resource | 1.7.0 | |
zoom | boolean | false | Whether | Adjust the focal length | 2.1.0 |
device-position | string | front | Whether |
Front or rear, value
front
back
|
2.3.0 |
background-mute | boolean | false | Whether | Whether to mute when entering the background (abandoned, default back to background mute) | 1.7.0 |
mirror | boolean | false | Whether | Set whether the push screen is mirrored, resulting in an effect that live-player reacts to | 2.7.0 |
remote-mirror | boolean | false | Whether | With the mirror property, subsequent mirrors are discarded | 2.10.0 |
local-mirror | string | auto | Whether | Controls whether the local preview screen is mirrored | 2.10.0 |
audio-reverb-type | number | 0 | Whether | The audio reverb type | 2.10.0 |
enable-mic | boolean | true | Whether | Turn the microphone on or off | 2.10.0 |
enable-agc | boolean | false | Whether | Whether to turn on audio auto gain | 2.10.0 |
enable-ans | boolean | false | Whether | Whether audio noise suppression is turned on | 2.10.0 |
audio-volume-type | string | auto | Whether | The volume type | 2.10.0 |
video-width | number | 360 | Whether | The resolution width of the video stream pushed up | 2.10.0 |
video-height | number | 640 | Whether | The resolution height of the video stream pushed up | 2.10.0 |
beauty-style | string | smooth | Whether | Set the beauty type | 2.12.0 |
filter | string | standard | Whether | Set the color filter | 2.12.0 |
bindstatechange | eventhandle | Whether | State change event, detail s. | 1.7.0 | |
bindnetstatus | eventhandle | Whether | Network status notifications, detail . | 1.9.0 | |
binderror | eventhandle | Whether | Rendering error events, details, serrMsg, errCode | 1.7.4 | |
bindbgmstart | eventhandle | Whether | Triggered when the background tone starts playing | 2.4.0 | |
bindbgmprogress | eventhandle | Whether | Triggered when the background tone progress changes, detail . | 2.4.0 | |
bindbgmcomplete | eventhandle | Whether | Triggered when background tone playback is complete | 2.4.0 | |
bindaudiovolumenotify | eventhandle | Whether | Returns the volume level captured by the microphone | 2.12.0 |
The legal value of orientation
Value | Description | The lowest version |
---|---|---|
vertical | Vertical | |
horizontal | Level |
The legal value of local-mirror
Value | Description | The lowest version |
---|---|---|
auto | The front camera mirrors, and the rear camera does not mirror | |
enable | The front and rear cameras are mirrored | |
disable | Neither the front and rear cameras are mirrored |
The legal value of audio-reverb-type
Value | Description | The lowest version |
---|---|---|
0 | Shut down | |
1 | Ktv | |
2 | Small room | |
3 | Town hall | |
4 | Low | |
5 | Loud | |
6 | Metallic sound | |
7 | Magnetic |
The legal value of audio-volume-type
Value | Description | The lowest version |
---|---|---|
auto | Automatic | |
media | Media volume | |
voicecall | The volume of the call |
The legal value of beauty-style
Value | Description | The lowest version |
---|---|---|
smooth | Smooth and beautiful | |
nature | Natural beauty |
The legal value of the filter
Value | Description | The lowest version |
---|---|---|
standard | Standard | |
pink | Pink | |
nostalgia | Nostalgia | |
blues | Blues | |
romantic | Romantic | |
cool | Cool | |
fresher | Fresh | |
solor | Japanese | |
aestheticism | Beautiful | |
whitening | Whitening | |
cerisered | Cherry Blossom Red |
Code | Description |
---|---|
10001 | The user is prohibited from using the camera |
10002 | The user is prohibited from using the recording |
10003 | The background tone resource (BGM) failed to load |
10004 | Waiting for the screen resource (waiting-image) to fail to load |
Code | Description |
---|---|
1001 | The pushstream server is already connected |
1002 | You have shaken hands with the server and started pushing the stream |
1003 | Turning on the camera succeeded |
1004 | The recording screen started successfully |
1005 | The push stream dynamically adjusts the resolution |
1006 | Push flow dynamically adjusts the code rate |
1007 | The first frame screen acquisition is complete |
1008 | The encoder starts |
-1301 | Turning on the camera failed |
-1302 | Turning on the microphone failed |
-1303 | The video encoding failed |
-1304 | The audio encoding failed |
-1305 | Video resolution is not supported |
-1306 | The unsupported audio sample rate |
-1307 | The network is disconnected, and after multiple re-link rescue is invalid, more retry please restart the push stream yourself |
-1308 | The start recording failed, possibly being rejected by the user |
-1309 | Recording screen failure, unsupported version of Android system, need more than 5.0 systems |
-1310 | The recording was interrupted by other apps |
-1311 | Android Mic was turned on successfully, but no audio data was recorded |
-1312 | Recording the screen dynamic cut horizontal vertical screen failed |
1101 | Network conditions are poor: the up-line bandwidth is too small and uploading data is blocked |
1102 | The network is disconnected and an automatic reconneconne is started |
1103 | Hard-coded startup fails with soft-coded |
1104 | The video encoding failed |
1105 | New Meiyan soft coding start failed, using the old soft coding |
1106 | New Meiyan soft coding start failed, using the old soft coding |
3001 | RTMP -DNS resolution failed |
3002 | The RTMP server connection failed |
3003 | The RTMP server handshake failed |
3004 | If the RTMP server is actively disconnected, check the legitimacy of the pushstream address or the expiration date of the chain |
3005 | RTMP failed to read/write |
The key name | Description |
---|---|
videoBitrate | The bit rate, kbps, of the current video codec output |
audioBitrate | The bit rate, kbps, of the current audio codec output |
videoFPS | The current video frame rate |
videoGOP | The current video GOP, which is the length of each two key frames (I-frames) interval, in s |
netSpeed | The current send/receive speed |
netJitter | Network jitter, the greater the jitter, the more unstable the network |
videoWidth | The width of the video screen |
videoHeight | The height of the video screen |