LazeMSS / OctoPrint-UICustomizer

UI Customizer for octoprint
165 stars 18 forks source link

WebCam Preview not working in Octoprint 1.9.0 #293

Closed XeroZar closed 1 year ago

XeroZar commented 1 year ago

Description

**ENTER DESCRIPTION HERE After I updated to Octoprint 1.9.0, the webcam preview stopped working... Please fix.


Plugins installed

UI Customizer settings

Software versions

Browser

jneilliii commented 1 year ago

additional details starting here: https://discord.com/channels/704958479194128507/708230099811434497/1113595887600549948

LazeMSS commented 1 year ago

Will look asap

jjorstad2 commented 1 year ago

additional details starting here: https://discord.com/channels/704958479194128507/708230099811434497/1113595887600549948

Can you post the info here because link does not work.

jneilliii commented 1 year ago

Link took me to the OctoPrint discord post, but I think this may be resolved with the next bug fix version of OctoPrint. @cp2004 figured out something strange with the observer being used now in the cameras relative to percentage visibility.

Summarizing the issue, if the webcam is in the center column with tabs the stream will load for 2-3 seconds same then go black.

jjorstad2 commented 1 year ago

Link took me to the OctoPrint discord post, but I think this may be resolved with the next bug fix version of OctoPrint. @cp2004 figured out something strange with the observer being used now in the cameras relative to percentage visibility.

Summarizing the issue, if the webcam is in the center column with tabs the stream will load for 2-3 seconds same then go black.

ok thanks I was not joined on that discord server and the link did not say what server to join so I had no clue

cp2004 commented 1 year ago

Link took me to the OctoPrint discord post, but I think this may be resolved with the next bug fix version of OctoPrint. @cp2004 figured out something strange with the observer being used now in the cameras relative to percentage visibility.

Summarizing the issue, if the webcam is in the center column with tabs the stream will load for 2-3 seconds same then go black.

I can't reproduce this issue in my install, so I can't say that the change I was looking into will make a difference or not.

For me, the webcam stuff in UI Customizer and OctoPrint 1.9.0 seems to work perfectly, I can't break it - regardless of the changes I proposed to the intersection observer. Works with both my plugin and the classic webcam one as well.

cp2004 commented 1 year ago

Having said that, the webcam will stop streaming if you are scrolled away from the top of the page for more than 3 seconds. This is what I can reproduce and was part of the issue I was investigating.

dannybloe commented 1 year ago

I got the same problem. Cam works fine but not in the side panel. Maybe these console messages help:

image

LazeMSS commented 1 year ago

I got the same problem. Cam works fine but not in the side panel. Maybe these console messages help:

image

Which OctoPrint version are you running? (Ahh 1.9.0 is says so in error log) Does it work if you disable the prettyGcode plugin?

dannybloe commented 1 year ago

Running 1.9 here. Doesn't work with prettyGcode disabled as well. Still get the yellow warnings and the red packed_core.js?39bcd23a:1752 Error calling onAllBound on view model UICustomizerViewModel : TypeError: Cannot read properties of undefined (reading 'subscribe')

The side panel only shows a spinner. Classic cam plugin is also disabled btw.

LazeMSS commented 1 year ago

Could you try and post the content of the: packed_core.js?39bcd23a:1752

basically clicking the link in console.

dannybloe commented 1 year ago

packed_core.js.zip

LazeMSS commented 1 year ago

does it work if you move the cam to sidebar instead of the center and could you post the plugins your are running?

LazeMSS commented 1 year ago

The new way multicam plugin is not supported in my plugin - my plugin only support classic webcam and previous 1.9.0 way (basically the same but different ways) i will look a bit more

cp2004 commented 1 year ago

The new way multicam plugin is not supported in my plugin

It looked to me like it was pretty much working OK, with my 'Camera Streamer Control' plugin and the multicam plugin.

dannybloe commented 1 year ago

The new way multicam plugin is not supported in my plugin - my plugin only support classic webcam and previous 1.9.0 way (basically the same but different ways) i will look a bit more

You can do it! I believe in you 😉

nullable-eth commented 1 year ago

After [just] installing UI Customizer my Webcam view will go black randomly. If I minimize the Webcam frame it will come back. Not un-installing UI Customizer though, love it too much (good work). This only just happened, been using the same webcam for a while and has been rock solid. I also have Octolapse installed which is using the webcam and I have noticed that when Octolapse does a snapshot it seems to black out the other camera views, this did not happen prior to UI Customizer though.

Screenshot 2023-06-15 at 10 54 27 PM Screenshot 2023-06-15 at 10 54 34 PM

Running Octoprint 1.9.0, Logitech C270 on Raspi 3B using Brave (Chromium) web browser.

LazeMSS commented 1 year ago

Should be fixed in: https://github.com/LazeMSS/OctoPrint-UICustomizer/releases/tag/0.1.9.8

Please check and reopen if not working - thank you...