HA web interface: Enable "pinch to zoom" on mobile devices

When using the Home Assistant web interface on mobile devices / devices with touch screens, you cannot pinch to zoom. This is just annoying and I am sure this is a really easy thing to fix.

Change this

<meta name="viewport" content="width=device-width, user-scalable=no">

To

<meta name="viewport" content="width=device-width, user-scalable=yes">

Is there perhaps a reason to decrease the usability?

Update 2020-03-23: This has NOTHING to do with video-feeds. This is just to be able to zoom in when using Lovelace.

Would be great if the camera component support pitch to zoom. If you have a photo display through this component zooming is not possible for now.

2 Likes

Yeah, the camera component at least should have that option. The only way I have to ā€œzoomā€ it is to switch my device to landscape mode.

2 Likes

Hi, Iā€™m working with the camera component andere would love this feature.

Is this already possible, or can this be implemented?

Is this something we could just edit ourselves in the source code somewhere?

1 Like

This would be great, I use the camera component with a ZoneMinder server, the camera feeds load much quicker in HA than ZMninja and the pinch and zoom is the only thing stopping me using HA instead of ZMNinja to look at the Zoneminder camera feeds.

or if we could wrap the video feed in some html/css that supported pinching/zooming.

1 Like

This has NOTHING to do with video-feeds. This is just to be able to zoom in when using Lovelace.

Did you guys notice that it works now in v.117? Something changedā€¦

I noticed this as well and reverted back to 116 because of this and an issue with how markdown card is changed.

Pinch to zoom on mobile makes absolutely no sense to me whatsoever. On mobile the UI is tailored to fit the screen. I experienced zoom by double tapping some areas (like button cards with double_tap action) or when hold the phone and having accidental touch inputs with more than one finger. This totally ruins the experience on mobile.

Currently Iā€™m back on 116 but I hope 118 will revert thisā€¦

You have good eyes then ;-). For us olds with failing vision itā€™s a lifesaver.

2 Likes

Why not use the option to increase page zoom within HA app? This way you can increase all content size by default. This is on iOS at least, not sure if itā€™s on Android.

The pinch to zoom isnā€™t an issue per se btw. But double tapping to zoom is. You have to use two fingers to zoom out every time.

Pinch to zoom is, as mentioned, a life saver for us without perfect vision.

I did increase the general font size in my phone and hereā€™s what it looks like: Anyone who thinks this is fine, please raise your hand. :slight_smile:

1 Like

I have no problem with removing double tap to zoom. But you canā€™t have pinch to zoom. Itā€™s like canceling our health care :stuck_out_tongue_winking_eye:

1 Like

Iā€™m not finding a zoom option in the android app. Iā€™ve tried both pinch and taps. However zoom works with Chrome. I guess I wonā€™t be using the app.

If you guys still really need this try to submit a feature request to the android repo directly

Hi all, this should actually work on many browsers, or you can check the option in iOS app for example. But I noticed it didnā€™t work on Fully Kiosk Browser, for example. To fix that you can do the following:

Put this in a file called zoom-enable.js in your config/www folder

document.querySelector("meta[name=viewport]").setAttribute("content", "width=device-width, viewport-fit=cover");

Add this to your configuration.yaml:

frontend:
  extra_module_url:
    - /local/zoom-enable.js

Restart and bobā€™s your uncle.

6 Likes

Is it possible to get this working in the android app? Pinch to zoom on video feeds would be really nice.

1 Like

Iā€™m not an android user but Iā€™m guessing you should be able to enable it in the configuration setttings for the app as you can on the iOS app.

I would love this feature for the HA Android app. Pinch to zoom for cameras etc.
This functionality would essentialy render the ā€˜officialā€™ camera apps totally obsolete and I could do basically everything from Home Assistant! :heart: