mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 00:50:01 +00:00
small fixes in network nodes
This commit is contained in:
@@ -712,7 +712,7 @@ function ImageWebcam()
|
||||
|
||||
ImageWebcam.title = "Webcam";
|
||||
ImageWebcam.desc = "Webcam image";
|
||||
|
||||
ImageWebcam.is_webcam_open = false;
|
||||
|
||||
ImageWebcam.prototype.openStream = function()
|
||||
{
|
||||
@@ -731,6 +731,7 @@ ImageWebcam.prototype.openStream = function()
|
||||
function onFailSoHard(e) {
|
||||
console.log('Webcam rejected', e);
|
||||
that._webcam_stream = false;
|
||||
ImageWebcam.is_webcam_open = false;
|
||||
that.boxcolor = "red";
|
||||
that.trigger("stream_error");
|
||||
};
|
||||
@@ -746,6 +747,7 @@ ImageWebcam.prototype.closeStream = function()
|
||||
for(var i = 0;i < tracks.length; ++i)
|
||||
tracks[i].stop();
|
||||
}
|
||||
ImageWebcam.is_webcam_open = false;
|
||||
this._webcam_stream = null;
|
||||
this._video = null;
|
||||
this.boxcolor = "black";
|
||||
@@ -786,6 +788,7 @@ ImageWebcam.prototype.streamReady = function(localMediaStream)
|
||||
video.onloadedmetadata = function(e) {
|
||||
// Ready to go. Do some stuff.
|
||||
console.log(e);
|
||||
ImageWebcam.is_webcam_open = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user