-
Notifications
You must be signed in to change notification settings - Fork 11
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
[tvOS] Touch gestures or events need improvement #11
Comments
I'm with Josh! tvOS apps built with AIR must feel like native apps when it comes to touch input. Please make this possible by fixing / re-evaluating these points. |
Adobe Tracker won't let me comment on the issue, so I'll add my comment here. I think that TransformGestureEvent.GESTURE_DIRECTIONAL_TAP should also be dispatched when Multitouch.inputMode is set to TOUCH_POINT. Currently, it's only dispatched when Multitouch.inputMode is set to GESTURE. It's possible to manually detect other gestures using raw TouchEvents, if necessary. GESTURE_DIRECTIONAL_TAP is different than the others because it's based on touching the edge of the Apple TV remote's touch surface. Raw TouchEvents don't expose enough information to know that a touch happened on the edge. That makes it impossible to detect this gesture when Multitouch.inputMode is set to TOUCH_POINT, but it's a very important core gesture of tvOS. |
I thought this was solved on current Air version, but still the same... |
@PrimaryFeather @joshtynjala do you guys know if Adobe is planning a fix for this? I think Apple TV support is a great plus for AIR, swipe gesture the most important ui interaction for this plattform. |
I believe that it's unlikely that Adobe will do anything to further improve tvOS support. |
You can use now this extension from Distriqt: https://github.com/distriqt/ANE-SystemGestures/wiki/u.Native-Gesture-Events, It supports all tvOS events |
It's worth pointing out this detail from the AIR 32 release notes, which indicates that Adobe does not consider tvOS a high-priority platform:
Source: https://helpx.adobe.com/flash-player/release-note/fp_32_air_32_release_notes.html |
Tracker URL: https://tracker.adobe.com/#/view/AIR-4198411
AIR Version: 26.0.0.118
Platform: tvOS
Some observations based on the touch/gesture options listed in the release notes for tvOS:
In native apps on tvOS, if you change direction between touch begin and end, it can pass focus in both directions. In other words, if you were moving the touch from left to right, it will pass focus from left to right, but if you start moving the same touch from right to left without ending it first, it will start passing focus from right to left instead. AIR does not dispatch TransformGestureEvent.GESTURE_SWIPE again if a touch changes direction. Maybe it should? If not, then another gesture or raw touch events need to provide the data that would be needed to recreate the native behavior.
This allows me to listen for TouchEvent.TOUCH_MOVE, which gives me some good information about the touches. The localX, localY, stageX, and stageY properties change when I touch the Siri remote and move my finger around. It's a little more work than using a gesture, but this would allow me to simulate the native focus change behavior manually.
However, I discovered that the localX, localY, stageX and stageY properties are only within the range of -1920 to 1920 horizontally and -1080 to 1080 vertically. In other words, if my touch is moving from left to right, and the stageX value reaches 1920, continuing to move my touch from left to right will not change the value of stageX anymore. It will remain at the maximum value of 1920. If I wanted to write some code that manually detects some kind of swipe/pan gesture based on the position of the touch (instead of using the gesture event mentioned earlier), it would fail if the current touch position is near any of these limits. Is it AIR or tvOS that is creating this restriction? If it's AIR that is artificially limiting these values, I think that should be reconsidered.
The text was updated successfully, but these errors were encountered: