gdombiak / OctoPod

Free open source client for OctoPrint
Apache License 2.0
228 stars 42 forks source link

Feature request: Option to reload camera stream #701

Closed dapetcu21 closed 3 weeks ago

dapetcu21 commented 1 month ago

The webcam stream can get stuck for quite a lot of reasons:

While ideally some these should be handled and recovered from by the app, a manual reload option would be great (I'm currently killing and restarting the app every time the webcam stream gets stuck)

I'm using OctoPi's new WebRTC webcam stack, if it's relevant.

KayGundhardt commented 4 weeks ago

Here too: would really appreciate even an „auto-reload-on-stuck“ feature?

gdombiak commented 4 weeks ago

This is a good idea. I realized that I swipe between cameras to force a refresh since I have multiple cameras which is not evident, optimal or available to everyone. Added to next release.

Thanks, Gaston

gdombiak commented 3 weeks ago

Feature implemented. Testing before pushing new release out. Probably some time this week.

Simulator Screenshot - iPhone 15 Pro Max - 2024-08-18 at 17 36 30

KayGundhardt commented 3 weeks ago

Coooool - thank you: that’s great! Will it also auto-reload when timed out or is this just a manual button to be pushed?

gdombiak commented 3 weeks ago

Hi @KayGundhardt,

The refresh button appears when any type of error happens while trying to render the camera. The user will have to manually press the button to retry if they want to give it another shot. Would this work for you?

Regards, Gaston

KayGundhardt commented 3 weeks ago

Sure, that’s a progress :)But as I monitor my farms printers on some tablets running your app it would be great not running all the way from one to the next but them refreshing their viewport themselves when rendering errors occur… Could that maybe be integrated too?Am 19.08.2024 um 16:58 schrieb Gaston Dombiak @.***>: Hi @KayGundhardt, The refresh button appears when any type of error happens while trying to render the camera. The user will have to manually press the button to retry if they want to give it another shot. Would this work for you? Regards, Gaston

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

gdombiak commented 1 week ago

Hi @KayGundhardt, I implemented an exponential backoff algorithm so that OctoPod retries rendering the camera in case of a timeout with an increasing delay between retries. There is a maximum retry of 10 times and delay doubles between retries. That totals to 36 minutes of trying to render the camera before giving up. If the user manually clicks retry, reopens the app, switches camera or printer then retries reset to 0 so a timeout triggers a retry from scratch.