
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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);
Advertisements