- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Enable rear camera with HTML5
To enable rear camera, firstly use −
MediaStreamTrack.getSources(gotSources);
Now, select the source and pass it in as optional into getUserMedia method.
This method is useful for users to set permission to use up to one video input device −
var a = { audio: { optional: [{sourceId: audioSource}] }, video: { optional: [{sourceId: videoSource}] } }; navigator.getUserMedia(a, successCallback, errorCallback);
- Related Articles
- How to actually work with HTML5 Canvas camera/viewport?
- Allow only access to camera device in HTML5
- How to “enable” HTML5 elements in IE 8 that were inserted by AJAX call?
- How to work with Camera in an Android App?
- How to take pictures with camera on Android Programmatically?
- How to disable/ enable checkbox with jQuery?
- What is the difference between an IP Camera and CCTV Camera?
- What is Pinhole Camera ?
- How to work with Camera in an Android App using Kotlin?
- Image button with HTML5
- Backward compatibility with HTML5
- How to disable/enable an input box with jQuery?
- What is a pinhole camera?
- Drop Shadow with HTML5 Canvas
- JavaScript File Drop with HTML5

Advertisements