Controls overlay for video on iPhone/iPad

后端 未结 2 1461
天命终不由人
天命终不由人 2021-01-05 05:13

I am writing a webapp where I need to display a video and some (non standard) controls for it, which should appear in overlay. So create some divs and position them over the

2条回答
  •  清酒与你
    2021-01-05 05:36

    I had the same problem and got it working by setting the CSS property of the HTML5 video element while

    paused to -webkit-transform:scale(0.01);

    playing to -webkit-transform:scale(1);

    The problem is that the HTML5 video element on iOS seems to hijack the click events in the areas (of the elements layered on top) that are contained in the bounding box of the video element. If the bounding box is made smaller with scale(0.01) or the bounding box is pushed off the screen with translateX(-2560px), no element areas are directly above the video element and the click events will get fired.

提交回复
热议问题