Currently, when the small-screen ads UI is used on a touch device, two touches are needed to either hit the "skip ad" button or to open the ad click-through URL. Especially for the "skip ad" button this is a confusing user experience as it is always visible and one touch should be sufficient to tap it.
To fix this, a new configuration option allowDefaultActionOnFirstTouch is introduced on UIContainerConfig that can be used to control whether the default action should be executed after showing the hidden UI on a first touch. The allowDefaultActionOnFirstTouch flag is now set to true for modernSmallScreenAdsUI, allowing first touches to trigger the click-through URL and also the "skip ad" button.
Discussion
A drawback of this approach is that also buttons from the title bar can receive this first touch now during ads. Specifically, the fullscreen button, which is the only one that is visible there during ad playback.
There would be some ways to improve on this situation:
(1) Attach a payload to the onClick event that determines if it is a first touch. Event receiving components could check for this flag and decide on their own if they want to handle onClick in case they are first touches. The "skip ad" button and the ad click overlay would be then implemented in a way that they accept onClicks that are first touches and the fullscreen button would ignore such onClick events.
(2) Decide in UIContainer.touchend event handler if the default action should be prevented or not based on the event target.
(1) seems a bit more elegant than (2) as the components are allowed to decide for themselves if they want to react to first touches.
ticket: https://bitmovin.atlassian.net/browse/PI-2655
Description
Currently, when the small-screen ads UI is used on a touch device, two touches are needed to either hit the "skip ad" button or to open the ad click-through URL. Especially for the "skip ad" button this is a confusing user experience as it is always visible and one touch should be sufficient to tap it.
To fix this, a new configuration option
allowDefaultActionOnFirstTouch
is introduced onUIContainerConfig
that can be used to control whether the default action should be executed after showing the hidden UI on a first touch. TheallowDefaultActionOnFirstTouch
flag is now set totrue
formodernSmallScreenAdsUI
, allowing first touches to trigger the click-through URL and also the "skip ad" button.Discussion
A drawback of this approach is that also buttons from the title bar can receive this first touch now during ads. Specifically, the fullscreen button, which is the only one that is visible there during ad playback.
There would be some ways to improve on this situation:
onClick
event that determines if it is a first touch. Event receiving components could check for this flag and decide on their own if they want to handleonClick
in case they are first touches. The "skip ad" button and the ad click overlay would be then implemented in a way that they acceptonClick
s that are first touches and the fullscreen button would ignore suchonClick
events.UIContainer.touchend
event handler if the default action should be prevented or not based on the event target.(1) seems a bit more elegant than (2) as the components are allowed to decide for themselves if they want to react to first touches.
Tests
Checklist (for PR submitter and reviewers)
CHANGELOG
entry