In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how WeChat Mini Programs supports peripherals". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought. Let's study and learn how WeChat Mini Programs supports peripherals.
In the development of WeChat Mini Programs, we will use Bluetooth, cameras, recording and other equipment. When using these devices, we can obtain the authorization of the user before operating.
1. The use of the camera, the use of the camera mainly includes taking pictures and shooting videos, both of which are when users upload pictures, we can choose to shoot and upload them by adding the camera attribute in soureType. After uploading, we can get the temporary paths of these videos and pictures, and add tags or tags to the page to display the uploaded videos or pictures, but this temporary path cannot be saved. You need to upload it to your own server to save it. (note: when using video tags).
BindButtonTap: function () {var that = this wx.chooseVideo ({sourceType: ['album',' camera'], maxDuration: 60, camera: ['front',' back'], success: function (res) {console.log (res); that.setData ({src: res.tempFilePath / / tempfilepath is the temporary path for file upload})}}) }
2. Bluetooth, network status, phone calls and other devices can be accessed and opened directly using the interface provided by Wechat. In particular, there are screenshot trigger events (wx.onUserCaptureScreen), clipboard set and get events (wx.setClipboardData), and events that make the phone vibrate (wx.vibrateLong) in Wechat.
Thank you for your reading. the above is the content of "how to support peripherals by WeChat Mini Programs". After the study of this article, I believe you have a deeper understanding of how WeChat Mini Programs supports peripherals. The specific use of the situation also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.