LazeMSS / OctoPrint-UICustomizer

UI Customizer for octoprint
165 stars 18 forks source link

Webcam stream loading forever in webcam side widget, despite displaying in main area #298

Closed triton-nereide closed 1 year ago

triton-nereide commented 1 year ago

While visible and working in the main area, the video stream keeps loading forever in the video stream side-widget. Does anybody by any chance know, what´s happening here?

second question: I modified the red night theme by putting it´s css in the "advanced" css section of the plugin and editing it. Sometimes it seems to loose this modified css and displays like red night original. when I open the plugin settings and click on preview it displays correctly again. Why this?

LazeMSS commented 1 year ago

I will look into it asap - on holliday at the moment.

triton-nereide commented 1 year ago

Have a good one! Thanks for an awsome plugin!

triton-nereide commented 1 year ago

As I investigated this further, my thoughts are these: I am using the new Octopi 1.0 - Octoprint 1.9.1 beta with the "new camera streamer" plugin. Your theme expects the old MJPEG streamer, so it fails to load the new webrtc stream inside the sidebar widget. (In the main area the webrtc stream loads with no issues) I did some tests today: I deleted the data that was stored inside the classic webcam plugin and made a restart. After the restart the classic webcam plugin was enabled ((despite I disabled it some time ago) but with no data stored for the MJPG stream), alongside the Camera Streamer Plugin. From that moment on the webrtc stream was loaded correctly in the sidebar widget (it hat an overlay text saying "webcam not configured" (because there is no data in "classic webcam plugin)), and the stylesheet losses were gone too. So I assume that the old "classic webcam" plugin delivers something that is missing to correctly load the webrtc stream inside the side bar widget, and with this delivery it solves the css issue too.

Conclusion: If you where so kind to change your code so that the webrtc video can load in the sidebar widget, all the issues are gone, even when disabling "classic webcam" plugin.

loroff commented 1 year ago

bonjours depuis la version 1.9.1 le flux de la webcam dans l onglet laterale disparait j utilise camera streamer ou classic webcam mais cela ne change rien .pour recuperer le flux je passe sur l onglet controle et le flux lateral reapparait .merci

triton-nereide commented 1 year ago

For me it does not matter if I change to "Control" tab or not, as soon as I disable classic webcam plugin, camera streamer shows no video in sidebar, and after restart the interface loads without the custom css. As soon as I activate classic webcam plugin again all works normal. (It is necessary to delete any configuration for classic webcam plugin). All that remain then is an overlay to the videostream, saying "webcam not configured". (this is because any config in "classic webcam plugin needs to be deleted to make the new camera streamer work)

jneilliii commented 1 year ago

I wonder if you could utilize self.coresettings.webcam_webcams observable array in your viewmodel @LazeMSS to get a handle of the stream URL no matter what plugin is being used.

LazeMSS commented 1 year ago

I will look when im back from holliday :)

LazeMSS commented 1 year ago

I wonder if you could utilize self.coresettings.webcam_webcams observable array in your viewmodel @LazeMSS to get a handle of the stream URL no matter what plugin is being used.

Then I just need to figure out which is the active entry right now and the get all the data from that entry?

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...