bitmovin / bitmovin-player-ui

The Bitmovin Adaptive Streaming Player UI
MIT License
126 stars 87 forks source link

Add config to allow default action for first touch #624

Closed hawk23 closed 5 months ago

hawk23 commented 5 months ago

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 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) 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)

stonko1994 commented 5 months ago

Closing in favour of #626 & #627