video hides some controls,

// controlslist=“nodownload nofullscreen noremoteplayback”;
 
      <video
        controls
        controlslist="nodownload"  //禁用下载
        class="video-player"
        disablePictureInPicture  // 禁用画中画
        oncontextmenu = "return false"  //禁用鼠标右键
      ></video>
 // // 播放按钮
    video::-webkit-media-controls-play-button {
    
    
      display: none !important;
    }
    // 当前播放时间
    video::-webkit-media-controls-current-time-display {
    
    
      display: none !important;
    }
    // 剩余时间
    video::-webkit-media-controls-time-remaining-display {
    
    
      display: none !important;
    }
    // 音量按钮
    video::-webkit-media-controls-volume-control-container {
    
    
      display: none !important;
    }
    // 全屏
    video::-webkit-media-controls-fullscreen-button {
    
    
      display: none !important;
    }
    // 时间轴
    video::-webkit-media-controls-timeline {
    
    
      display: none !important;
    }
    // 更多选项 --然而并不生效
    video::-internal-media-controls-overflow-button {
    
    
      display: none !important;
    }

controlslist: The values ​​are as follows, set multiple space intervals
nodownload: cancel the download function of more control pop-up windows;
nofullscreen: cancel the full-screen function;
noremoteplayback: cancel remote playback video
controlslist="nodownload" + disablePictureInPicture, two options in the pop-up window After canceling all, the more button disappears automatically

Refer to other websites: https://blog.csdn.net/qq_38417082/article/details/103749942

Guess you like

Origin blog.csdn.net/xingchen678/article/details/125175308