After the full screen of video, an a tag I wrote was covered.

my button "SD" can be seen without full screen.

"" :

how to solve this problem, wait online

Apr.09,2021

set a lower video index. If the levels of the two elements are different, remember to set the z-index of their parent elements


.

set z-index:2147483647 to SD and put this element after the video tag.

<video></video>
<a></a>

reason: after the video is full screen, its z-index is set to the maximum value. Under chrome and ie, it is 2147483647. Z-index exceeding this value will be set to the maximum value by default.

so, if an is in front of video, the two of them have the same Zmuri index. an is blocked by video. On the contrary, a will be on the video.

the SD button cannot be clicked after full screen.

the solution is to capture the click event at full screen, determine whether the click occurs on the "SD" button, and then trigger the "SD" click event.

  $(document).click(function(event) {
          if(isFullScreen()) {
              console.log(event.originalEvent);
              var $button = $('.videoModal a');
              var btnOffset    = $button.offset();
              var buttonWidth = $button.outerWidth();
              var buttonHeight = $button.outerHeight();
              if((event.screenX >= btnOffset.left && event.screenX  <= btnOffset.left + buttonWidth) && 
                  (event.screenY >= btnOffset.top && event.screenY <= btnOffset.top + buttonHeight)) {
                      $button.trigger('click');
                      return false;
              }
          }
  });

  function isFullScreen() {
    var fullscreenElement =
        document.fullscreenEnabled
        || document.mozFullscreenElement
        || document.webkitFullscreenElement;
    var fullscreenEnabled =
        document.fullscreenEnabled
        || document.mozFullscreenEnabled
        || document.webkitFullscreenEnabled;
    if (fullscreenElement == null)
    {
        return false;
    } else {
        return true;
    }
 }

Ah, have you solved it

Menu