Mobile Safari: link () element over video element does not work on click

前端 未结 5 1598
轻奢々
轻奢々 2020-12-09 04:19

my current project is a html website that contains a dropdown menu (javascript/jquery) and a html5 videoplayer (video-tag only).

When clicking on a menu entry, the d

5条回答
  •  半阙折子戏
    2020-12-09 05:01

    I tried just removing the controls and then add them again, but works only on iPad, on iPhone was the same thing. This is the code that worked

    $("#overlay_open").click(function(){
      $("video").prop("controls", false);
      $("video").css("opacity", 0);
    });
    
    $("#overlay_close").click(function(){
      $("video").prop("controls", true);
      $("video").css("opacity", 1);
    });
    

提交回复
热议问题