Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
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
