Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents be63f4d + 686f1fb commit daa897aCopy full SHA for daa897a
19 - Webcam Fun/scripts-FINISHED.js
@@ -8,7 +8,15 @@ function getVideo() {
8
navigator.mediaDevices.getUserMedia({ video: true, audio: false })
9
.then(localMediaStream => {
10
console.log(localMediaStream);
11
- video.src = window.URL.createObjectURL(localMediaStream);
+
12
+// DEPRECIATION :
13
+// The following has been depreceated by major browsers as of Chrome and Firefox.
14
+// video.src = window.URL.createObjectURL(localMediaStream);
15
+// Please refer to these:
16
+// Depreceated - https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
17
+// Newer Syntax - https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject
18
19
+ video.srcObject = localMediaStream;
20
video.play();
21
})
22
.catch(err => {
0 commit comments