当前位置:网站首页>Video label forbids downloading. The test is valid. Hide button. The test is valid at three points

Video label forbids downloading. The test is valid. Hide button. The test is valid at three points

2022-06-26 04:17:00 Never bow

adopt controlslist And disable right clicking so that the player cannot be downloaded

<video src="{$data.h_video}" class="swiper-slide-img" id="qqq" controls controlslist="nodownload  nofullscreen noremoteplayback" oncontextmenu = "return false">
     Your browser does not support it  video  label .
</video>

But there is a three-point function in the lower right corner of Google browser ( Download and picture in picture ), Picture in picture cannot be removed , adopt js The way to get rid of :

var video = $('#qqq');
//console.log(video); // Get all the properties and methods by printing 
video[0]['disablePictureInPicture'] = true; //disablePictureInPicture The property of the is changed to true

No downloads and picture in picture , It disappeared at three o'clock

原网站

版权声明
本文为[Never bow]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202180536198937.html