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