Initial commit: modern React video player library

Add all source files for a feature-rich, reusable video player built with React, TypeScript, and Vite. Includes core components, context, hooks, utilities, styles, demo app, and configuration files.
This commit is contained in:
hibna
2025-10-29 07:49:06 +03:00
parent d68df70124
commit b57b24d051
47 changed files with 4414 additions and 0 deletions
+112
View File
@@ -0,0 +1,112 @@
.progress-bar {
position: relative;
width: 100%;
height: 20px;
cursor: pointer;
display: flex;
align-items: center;
}
.progress-track {
position: relative;
width: 100%;
height: 4px;
background-color: var(--player-progress-bg);
border-radius: var(--player-radius-full);
overflow: hidden;
transition: height var(--player-transition-fast) ease;
}
.progress-bar:hover .progress-track,
.progress-bar.seeking .progress-track {
height: 6px;
}
.progress-buffered {
position: absolute;
top: 0;
left: 0;
height: 100%;
background-color: var(--player-buffered);
transition: width 0.1s ease;
}
.progress-played {
position: absolute;
top: 0;
left: 0;
height: 100%;
background-color: var(--player-primary);
transition: width 0.1s ease;
display: flex;
align-items: center;
justify-content: flex-end;
}
.progress-handle {
width: 12px;
height: 12px;
background-color: var(--player-primary);
border-radius: 50%;
transform: scale(0);
transition: transform var(--player-transition-fast) ease;
margin-right: -6px;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}
.progress-bar:hover .progress-handle,
.progress-bar.seeking .progress-handle {
transform: scale(1);
}
.progress-tooltip {
position: absolute;
bottom: calc(100% + 8px);
transform: translateX(-50%);
background-color: var(--player-bg-menu);
color: var(--player-text);
padding: 4px 8px;
border-radius: var(--player-radius-sm);
font-size: 12px;
font-weight: 500;
white-space: nowrap;
pointer-events: none;
box-shadow: var(--player-shadow-md);
z-index: 10;
}
.progress-tooltip::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 4px solid transparent;
border-top-color: var(--player-bg-menu);
}
@media (max-width: 640px) {
.progress-bar {
height: 24px;
}
.progress-track {
height: 3px;
}
.progress-bar:hover .progress-track,
.progress-bar.seeking .progress-track {
height: 5px;
}
.progress-handle {
width: 10px;
height: 10px;
margin-right: -5px;
}
/* Always show handle on mobile for easier touch interaction */
.progress-handle {
transform: scale(1);
}
}