How does WeChat Mini Programs realize the function that users can watch the full video only after paying for 5 seconds to watch the video?

two videos are returned without relying on the backend, and the frontend makes its own restrictions. How to determine the video playback length by whether to pay for it or not?



suggest learning how to read the document


get the context object through the wx.createVideoContext () method, then set a setTimeout, 5s after the video starts playing, pause the video through the context object, then overwrite a view above the video tag, or turn off the control

.
Menu