.wrapper-noaction {
position: absolute;
margin-top: -558px;
width: 100%;
height: 100%;
border: 1px solid red;
}
.video-stat {
width: 94%;
margin: 0 auto;
}
.player-control {
background: rgba(0, 0, 0, 0.8);
border: 1px solid rgba(0, 0, 0, 0.1);
left: 0;
bottom: 0;
width: 100%;
overflow: hidden;
z-index: 1000;
height: 7.5%;
padding-top: 8px;
}
.control {
font-size: 20px;
padding: 10px;
cursor: pointer;
color: #fff;
}
<div class="video-stat">
<div class="row">
<div class="embed-responsive embed-responsive-16by9">
<div id="ytplayer" class="embed-responsive-item"></div>
<div class="wrapper-noaction"></div>
</div>
</div>
<div class="row">
<div class="player-control text-center">
<span class="control" (click)="play();start=!start"><i class="icon-control-play" [class.icon-control-play]="start" [class.icon-control-pause]="!start" aria-hidden="true"></i></span>
<span class="control" (click)="stop();start=true"><i class="fa fa-stop" aria-hidden="true"></i></span>
<span class="control" (click)="volume()"><i class="icon-volume-2" [class.icon-volume-2]="!ismuted" [class.icon-volume-off]="ismuted" aria-hidden="true"></i></span>
</div>
</div>
</div>
Hey there! I am utilizing Angular 2 ytplayer to embed YouTube videos in my current project. My goal is to restrict users from clicking or right-clicking on the video player. To achieve this, I have added a transparent layer over the video player so that interaction is limited. While this solution works well for medium screen sizes, it does not adapt effectively to different screen sizes. Can you assist me in making this implementation responsive across all screen sizes, ensuring that users are unable to right-click on the player regardless of the device being used?