Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to actively call to stop recording in Mini Program

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article "how to actively call to stop recording in Mini Program" is not quite understood by most people except programmers. Today, in order to make you better understand "how to actively call to stop recording in Mini Program", the editor summed up the following contents for you. It has a certain reference value, the detailed steps of the content are clear, and the details are handled properly. I hope you can gain something through this article. Let's take a look at the specific content.

Note: since version 1.6.0, this API is no longer maintained. It is recommended to use a more powerful wx.getRecorderManager interface

Start recording. Automatically end the recording when you actively call wx.stopRecord, or when the recording lasts for more than 1 minute, and return the temporary file path of the recording file. This API cannot be called when the user leaves Mini Program.

User authorization scope.record is required

OBJECT parameter description:

The parameter type is required to indicate whether successFunction is called after recording is successful, and the temporary file path of the recording file is returned. Res = {tempFilePath: 'temporary path to the recording file'} failFunction No API call failed callback function completeFunction No API call ended callback function (both successful and failed call will be executed)

Note: the temporary path of the file can be used normally during the startup of Mini Program. For lasting preservation, you need to call wx.saveFile actively and access it only when Mini Program is started next time.

Success return parameter description:

Parameter describes the temporary path of the tempFilePath recording file wx.stopRecord ()

Call actively to stop recording.

Sample code:

Wx.startRecord ({success: function (res) {var tempFilePath = res.tempFilePath}, fail: function (res) {/ / recording failed}}) setTimeout (function () {/ / end recording wx.stopRecord ()}, 10000) what does Mini Program mean? Mini Program is an application that can be used without download and installation. It can be used immediately by scanning the QR code or searching for it. It is easy to operate and easy to spread. It can realize seven functions, such as message notification, offline scanning code, official account association and so on. It is based on Wechat, similar to APP. You can use it whenever you want. After using it, you will leave without taking up memory.

Thank you for your reading. I hope you have a certain understanding of the key issue of "how to actively call and stop recording in Mini Program". The specific usage still needs to be understood by everyone through hands-on experiments. Go and try it. If you want to read more articles about relevant knowledge points, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report