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

What are the ways of WeChat Mini Programs's video recording?

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the relevant knowledge of WeChat Mini Programs's video recording methods, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this WeChat Mini Programs video recording method. Let's take a look.

Method one

Wx.chooseVideo, the api Wechat will pop up two options to select video and shoot, because this time it is mainly about shooting video. When we click to shoot, Wechat will automatically pull to the camera for shooting. After recording, the system will temporarily cache the MP4 file through wx.chooseVideo.

Benefit: since the camera is generated by Wechat, the compatibility will be relatively stable.

The downside: it is also because of the interface generated by Wechat, so it is impossible to override the elements and change the style of the interface.

Method two

Generated by the native camera component, and then recorded by calling CameraContext.startRecord, and then stopped by CameraContext.stopRecord, CameraContext.stopRecord will have the corresponding temporarily cached MP4 file.

Benefits: native components we can use cover-view or cover-image to write corresponding styles in camera components, such as locking portraits and other operations, so there will be a variety of styles.

The downside: the compatibility is relatively poor. Once the stopRecord reports an error, it cannot stop the second time, resulting in the inability to define the camera component to start re-recording.

For example, in the scenario, the countdown time is 3 seconds to call stopRecord, and the user triggers the stopRecord through the click event, because sometimes the phone processing is relatively slow, because the stopRecord is triggered twice, but because the error return is faster than the first correct return, the stopRecord will always packet is stopping and stay stuck. And there are still a lot of people in the community who report similar errors that can't stop recording, so try to choose method one if you don't need to add something to the camera component.

This is the end of the article on "what are the ways of WeChat Mini Programs's video recording?" Thank you for reading! I believe you all have a certain understanding of the knowledge of "what are the ways of WeChat Mini Programs video recording?" if you want to learn more knowledge, you are 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

Internet Technology

Wechat

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

12
Report