mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 15:10:06 +00:00
@@ -71,7 +71,7 @@ graph.start();</pre>
|
||||
|
||||
<h2>Example of editor</h2>
|
||||
<ul>
|
||||
<li><a href="demo">Module editor</a></li>
|
||||
<li><a href="editor">Module editor</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Documentation</h2>
|
||||
|
||||
@@ -734,7 +734,7 @@
|
||||
// Texture Webcam *****************************************
|
||||
function ImageWebcam() {
|
||||
this.addOutput("Webcam", "image");
|
||||
this.properties = { facingMode: "user" };
|
||||
this.properties = { filterFacingMode: false, facingMode: "user" };
|
||||
this.boxcolor = "black";
|
||||
this.frame = 0;
|
||||
}
|
||||
@@ -744,8 +744,8 @@
|
||||
ImageWebcam.is_webcam_open = false;
|
||||
|
||||
ImageWebcam.prototype.openStream = function() {
|
||||
if (!navigator.getUserMedia) {
|
||||
//console.log('getUserMedia() is not supported in your browser, use chrome and enable WebRTC from about://flags');
|
||||
if (!navigator.mediaDevices.getUserMedia) {
|
||||
console.log('getUserMedia() is not supported in your browser, use chrome and enable WebRTC from about://flags');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@
|
||||
// Not showing vendor prefixes.
|
||||
var constraints = {
|
||||
audio: false,
|
||||
video: { facingMode: this.properties.facingMode }
|
||||
video: !this.properties.filterFacingMode ? true : { facingMode: this.properties.facingMode }
|
||||
};
|
||||
navigator.mediaDevices
|
||||
.getUserMedia(constraints)
|
||||
|
||||
Reference in New Issue
Block a user