-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
double_tap_action has no effect on iOS #1853
Comments
I don't have an iPhone to test, but playing around on Browserstack and I see this same behavior. The video element is swallowing the interaction. The same sadly happens on Android: Given that touch/mouse interaction with the video element is desirable, I am not sure there is anything that can/should be done here other than updating that troubleshooting description to include iOS in this limitation. |
Thanks for your answer! I don't have any clue how Home Assistant is doing that, but they support the double tap action on the Picture Glance card. This card is using an HTML video element, but maybe there's some hidden overlay over the video that capture the event? If you configure a double tap, it takes precedence over the tap action. Maybe Home Assistant source code can help? |
This is likely because (i) by default Picture Glance shows an image not a video, (ii) when you configure it to show a video, it won't show media controls. If you're prepared to sacrifice media controls, maybe this will work for you: live:
controls:
builtin: false <------------------------ Turns off builtin media controls
actions:
double_tap_action:
action: custom:frigate-card-action
frigate_card_action: ptz_digital
ptz_action: zoom_in
absolute:
zoom: 1.5 |
Yes, it's a video element when you configure it that way (think we're agreeing!). I just tested on Android, double tap works fine on this card, when built-in controls are off (just like it does on picture glance). It doesn't work on iOS, but picture glance does? |
Yes, with built-in controls disabled on the Frigate card, the double tap does nothing on iOS, but it's working on macOS (safari). I've tried adding an overlay to the Frigate card (a semi transparent PNG), and double tap is working fine on this overlay. However this is not the solution, because I lose ability to pinch/pan the video. |
It's not related to the card zooming either, turning that off doesn't change anything. Sadly it's extremely painful for me to debug problems like this, as I don't actually have any iOS device, so I'm left pawing around on Browserstack ... |
Could you tell me where to precisely find the source code responsible of the double tap, I could try to help in debugging. |
EDIT: ORIGINAL COMMENT: Your 'end' function in 'ActionHandler' is generating 3 events when double taping (iOS):
FYI, I've tried to add an event listener on 'dblclick' event, and it generates this event: dblclick is maybe the solution? |
@webjib Amazing! Yes, this is (obviously) exactly the right spot. Do you want to prepare a PR? I'd very much welcome it. There's a few special cases we'll need to test here that HA doesn't support, e.g.:
|
Sure, I can prepare a PR.
|
Card diagnostic information:
Description of problem:
Configuring a double_tap_action either for the view or just the live, has no effect on iOS. It works on Safari for Mac.
Tap and Hold actions are working fine on iOS.
The text was updated successfully, but these errors were encountered: