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 does HTML5 transfer the camera on the mobile phone?

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

Share

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

Today Xiaobian to share with you how HTML5 in the mobile phone call camera related knowledge points, detailed content, clear logic, I believe most people still know too much about this knowledge, so share this article for everyone to refer to, I hope you read this article after some harvest, let's learn about it together.

input call device recording

HTML5 official documentation explanation: capture attribute is used to invoke the device's camera or microphone.

When accept="audio/or video/," capture has only two values, one is user, which is used to invoke the face-oriented camera (such as the front camera of the mobile phone), and the other is environment, which is used to invoke the environmental camera (such as the rear camera of the mobile phone).

When accept="audio", invoke device microphone whenever capture exists, ignoring user and environment values.

As for the camera and filesystem mentioned online, the official did not mention it.

Official documents:

iOS most comply with HTML5 specifications, followed by X5 kernel, Android webview basically ignored capture.

Ideally, webviews should be developed as follows:

1. When accept="image/", capture="user" invokes front camera, capture="other values" invokes rear camera

2. When accept="video/", capture="user" calls the front VCR, capture="other values" calls the rear VCR

3. When accept="image/,video/", capture="user" invoke front camera, capture="other values", invoke rear camera, default camera, video can be switched

4. When accept="audio/*", capture="empty or arbitrary value", call the recorder

5. When input does not capture, folder options and camera or recorder options are given according to accppt type.

6. Input contains multiple when accessing folders can check multiple files, call system camera or recorder are only single file

7. Without multiple, only a single file can be used.

The above is all the content of this article "How to call the camera on the mobile phone in HTML5". Thank you for reading it! I believe everyone has a great harvest after reading this article. Xiaobian will update different knowledge for everyone every day. If you want to learn more knowledge, 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.

Share To

Development

Wechat

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

12
Report