access html 5 camera flash
Asked Answered
C

2

6

I want to acces phones camera flash(flashlight) automatic. like this app : https://www.youtube.com/watch?v=W_Lr3d9giCo

We can access camera with this html 5 controller

<input type="file" accept="image/*;capture=camera">

But how can we access camera's flash(flashlight)?is there any html(5) or javascript(jquery or other framework) plugin for this? I want to acces camera's flash with browser technologies(html 5,javascript,css)

Couch answered 13/3, 2015 at 23:7 Comment(0)
A
2

no, There is no attribute in HTML5 to access flashlight.

if you are using Cordova/phonegap/Ionic to package your HTML app you can use the following plugin to access the flashlight

https://www.npmjs.com/package/cordova-plugin-flashlight

installation and usage guide is given in above link.

Animatism answered 22/4, 2016 at 13:14 Comment(0)
S
0

for camera >> take photo

<input type="file" id="user" capture="user" accept="image/*">

for camera >> take video

<input type="file" id="environment" capture="environment" accept="video/*">
Scone answered 13/9, 2022 at 10:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.