foreword
Because the video cannot be inserted, what you see is the rendering (actually controlling the music), and it runs with background music .
By default, the music is played directly, and the user can click to pause and resume playback.
In addition to the basic functions, monitoring of playback, pause, and errors is also done, and you can expand it according to your business.
sample code
The code is clean and tidy (with super detailed comments), without any redundancy and waste code, and can be freely expanded according to the business.
It is recommended that you open the official WeChat documentation to view more functions,
Just find a page, copy the following code, and run it directly:
<!--index.wxml-->
<view class