In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will introduce in detail "How to start playing voice in Mini programs," the content steps are clear and detailed, the details are handled properly, and the editor will update different knowledge points every day. I hope this article "How to start playing voice in Mini programs" can give you unexpected gains. Please follow the ideas of the editor slowly. The specific contents are as follows. Let's harvest new knowledge together.
Note: Since version 1.6.0, this interface is no longer maintained. It is recommended to use the more powerful wx.createInnerAudioContext interface
Start playing voice while only one voice file is being played. If the previous voice file is not played, the previous voice will be interrupted.
OBJECT Parameter Description:
Parameter type Required Description Minimum version filePathString is the file path of the voice file to be played durationNumber No Specify the recording duration, the recording will automatically stop after reaching the specified recording duration, unit: second, default value: 601.6.0successFunction No Interface call successful callback function failFunction No Interface call failed callback function completeFunction No Interface call ended callback function (call success, failure will be executed)
Example code:
wx.startRecord({ success: function(res) {var tempFilePath = res.tempFilePath wx.playVoice({ filePath: tempFilePath, complete: function(){ } }) }}) What are the advantages of Mini programs? Mini programs are less difficult to develop than developers, saving development and operation costs, allowing developers to quickly develop a Mini programs. In addition, Mini programs can be easily acquired and disseminated in WeChat, which can meet the basic life application, meet the conversion of offline shops of life service category and non-rigid low-frequency applications. For users, it can save time cost and mobile phone memory space, and has excellent use experience.
Thank you for reading here. Xiaobian hopes that you have the most profound experience from the practical level on the key issue of "how to start playing voice in Mini programs." The specific use situation still needs to be understood by you through practice. If you want to read more articles related to content, please pay attention to 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.