bitmovin / bitmovin-player-ui

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

Assign components to their `HTMLElements` #626

Closed stonko1994 closed 5 months ago

stonko1994 commented 5 months ago

Description

Problem

We are trying to fix an issue on touch devices that certain elements, which are always visible, need to be touched twice in order to trigger the desired click action. This affects the AdSkipButton and the AdClickOverlay.

See this PR for more details on the problem and the solution: #627

Changes

As preparation for fixing the problem in a feasible way, this PR attaches the Component instances to their corresponding DOM / HTMLElements for easier access. This removes the need to traverse all components and find the correct instance e.g. in a touchend listener.

Details

Checklist (for PR submitter and reviewers)