Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Static placeholder image for webcam to prevent jumps on control tab #478

Closed
CptanPanic opened this issue May 25, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@CptanPanic
Copy link

commented May 25, 2014

It may be because I am running octoprint on a raspberry pi, but everytime I switch to control tab, it takes a few seconds to load the camera image. Since there is no size listed for the img tag, the controls start up at top of page, and then after the image loads, then they get shifted down towards the bottom. Is it possible to make this size static?

@foosel foosel changed the title Request: Add image size to control cam image size [Request] Static placeholder image for webcam to prevent jumps on control tab Jan 27, 2017

@foosel

This comment has been minimized.

Copy link
Owner

commented Jan 27, 2017

TODO:

  • set fixed aspect ratio for webcam (4:3, 16:9 will become letter boxed, no way to determine image size prior to loading)
  • provide placeholder image while stream is still loading, to prevent controls from jumping
  • if stream URL produces error, offer checkbox to disable stream loading for session (see #609)

foosel added a commit that referenced this issue May 8, 2017

Placeholder for webcam image to avoid moving controls on load
An aspect ratio of 16:9 is assumed, with other ratios showing black
letterbox borders as required.

During loading a text "Webcam loading..." is displayed in the webcam
space. On loading error, the (broken) image is hidden and an error
text is displayed instead.

Solves #478
@foosel

This comment has been minimized.

Copy link
Owner

commented May 8, 2017

This is now implemented on the maintenance branch, soon devel and will be part of the upcoming 1.3.3 release.

In the end I did it slightly differently than the above TODO list suggests.

We now have a webcam placeholder at aspect ratio of 16:9 or 4:3 (configurable) - well, or their portrait orientation equivalent if the webcam stream is rotated, a "Webcam stream loading..." message, a nice little error message if the loading went wrong, and no jumping controls anymore.

@foosel foosel added the status:solved label May 8, 2017

@foosel foosel added this to the 1.3.3 milestone May 8, 2017

@foosel

This comment has been minimized.

Copy link
Owner

commented May 31, 2017

1.3.3 was just released.

@foosel foosel closed this May 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.