videojs-trimmer
Version:
Video.js Trimmer Plugin
87 lines (79 loc) • 1.99 kB
CSS
.vjs-trimmer-container {
position: relative;
height: 70px; /* Increased height to accommodate markers below the trimmer */
width: 100%;
background: #333; /* Optional: for visibility */
}
.vjs-trimmer {
position: absolute;
left: 0;
right: 0;
bottom: 30px; /* Position above the time markers */
background: rgba(0, 128, 255, 0.5); /* Semi-transparent blue for visibility */
cursor: move; /* Indicates draggable */
height: 10px; /* Adjust as needed */
}
.vjs-trimmer-handle {
position: absolute;
bottom: 25px; /* Align with the trimmer bar */
width: 5px;
height: 15px;
background-color: white;
cursor: ew-resize;
transition: left 0.1s ease; /* Smooth movement during drag */
}
.vjs-trimmer-handle.start::before {
content: '';
position: absolute;
left: -10px;
top: 50%;
transform: translateY(-50%);
border-width: 10px;
border-style: solid;
border-color: transparent transparent transparent yellow;
}
.vjs-trimmer-handle.end::after {
content: '';
position: absolute;
right: -10px;
top: 50%;
transform: translateY(-50%);
border-width: 10px;
border-style: solid;
border-color: transparent yellow transparent transparent;
}
.vjs-time-markers {
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
}
.vjs-time-marker {
position: absolute;
bottom: 0; /* Position at the bottom of the trimmer container */
height: 20px; /* Height of the marker line */
width: 1px;
background-color: rgba(255, 255, 255, 0.3);
}
.vjs-time-label {
position: absolute;
bottom: 20px; /* Position labels just above the marker lines */
left: 50%;
transform: translateX(-50%);
font-size: 10px;
color: white;
background-color: rgba(0, 0, 0, 0.5);
padding: 2px 4px;
border-radius: 2px;
white-space: nowrap;
}
.vjs-trimmer-duration {
position: absolute;
top: 5px;
left: 10px;
font-size: 12px;
color: white;
background-color: rgba(0, 0, 0, 0.7);
padding: 2px 6px;
border-radius: 3px;
}