Refactor video player and camera angle switching
- Removed inline JSON data for video clips; replaced with API endpoint to fetch video data. - Simplified camera angle switching UI with a 3-column button grid around a Model Y graphic. - Updated camera view mapping to use 'back' instead of 'rear'. - Enhanced noise canvas handling during video loading. - Streamlined clip playback logic and added auto-play for next clips in the same camera. - Improved search and sorting functionality by removing unnecessary elements. - Updated HTML structure for better accessibility and user experience.
This commit is contained in:
1 parent
06dc4f5f51
commit
d12d5e5414
5 files changed
+508
-805
No files matched your search
+146
-310
@@ -82,75 +82,25 @@ header {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
flex: 1 1 320px;
|
||||
max-width: 480px;
|
||||
position: relative;
|
||||
}
|
||||
.search-wrap input {
|
||||
width: 100%;
|
||||
padding: 11px 40px 11px 40px;
|
||||
background: var(--bg-tertiary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 30px;
|
||||
color: var(--text-primary);
|
||||
font-size: 14px;
|
||||
outline: none;
|
||||
transition:
|
||||
border-color 0.2s,
|
||||
box-shadow 0.2s;
|
||||
}
|
||||
.search-wrap input:focus {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px rgba(227, 25, 55, 0.15);
|
||||
}
|
||||
.search-wrap .search-icon {
|
||||
position: absolute;
|
||||
left: 14px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--text-muted);
|
||||
pointer-events: none;
|
||||
}
|
||||
.search-wrap .clear-btn {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background: var(--bg-elevated);
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
}
|
||||
.search-wrap .clear-btn.visible {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
/* Layout: single column, centered */
|
||||
.layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.9fr) minmax(320px, 1fr);
|
||||
gap: 20px;
|
||||
padding: 20px 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
padding: 24px;
|
||||
flex: 1;
|
||||
align-items: start;
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Video Player Section */
|
||||
.player-panel {
|
||||
position: sticky;
|
||||
top: 84px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.video-stage {
|
||||
@@ -161,6 +111,7 @@ header {
|
||||
box-shadow: var(--shadow);
|
||||
border: 1px solid var(--border);
|
||||
aspect-ratio: 16 / 9;
|
||||
width: 100%;
|
||||
}
|
||||
.video-stage video {
|
||||
width: 100%;
|
||||
@@ -226,56 +177,6 @@ header {
|
||||
box-shadow: 0 0 8px var(--accent);
|
||||
}
|
||||
|
||||
/* Camera Synchronized Switch Bar */
|
||||
.cam-switch {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
padding: 12px;
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.cam-switch .cs-label {
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
color: var(--text-muted);
|
||||
width: 100%;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.cam-switch button {
|
||||
flex: 1 1 auto;
|
||||
min-width: 88px;
|
||||
padding: 9px 10px;
|
||||
background: var(--bg-tertiary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--text-secondary);
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
}
|
||||
.cam-switch button:hover:not(:disabled) {
|
||||
background: var(--bg-elevated);
|
||||
color: var(--text-primary);
|
||||
border-color: #444;
|
||||
}
|
||||
.cam-switch button.active {
|
||||
background: var(--accent);
|
||||
border-color: var(--accent);
|
||||
color: #fff;
|
||||
}
|
||||
.cam-switch button:disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.now-playing {
|
||||
font-size: 13px;
|
||||
color: var(--text-secondary);
|
||||
@@ -294,231 +195,112 @@ header {
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* Sidebar & Clip List */
|
||||
.sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.cam-tabs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
.cam-tabs .tab {
|
||||
padding: 8px 14px;
|
||||
/* =============================================
|
||||
Camera Selector: 3-column grid + car graphic
|
||||
============================================= */
|
||||
.cam-selector {
|
||||
width: 100%;
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 30px;
|
||||
border-radius: var(--radius);
|
||||
padding: 20px 24px;
|
||||
}
|
||||
|
||||
.cs-heading {
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cs-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto 1fr;
|
||||
gap: 16px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cs-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.cs-col:first-child {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.cs-col:last-child {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.cs-col:nth-child(2) {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cs-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 10px 16px;
|
||||
background: var(--bg-tertiary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--text-secondary);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
white-space: nowrap;
|
||||
min-width: 140px;
|
||||
justify-content: center;
|
||||
}
|
||||
.cam-tabs .tab:hover {
|
||||
background: var(--bg-tertiary);
|
||||
|
||||
.cs-btn:hover:not(:disabled) {
|
||||
background: var(--bg-elevated);
|
||||
color: var(--text-primary);
|
||||
border-color: #444;
|
||||
}
|
||||
.cam-tabs .tab.active {
|
||||
|
||||
.cs-btn.active {
|
||||
background: var(--accent);
|
||||
border-color: var(--accent);
|
||||
color: #fff;
|
||||
}
|
||||
.cam-tabs .tab .count {
|
||||
|
||||
.cs-btn:disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.cs-btn-label {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.cs-btn-count {
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
padding: 1px 7px;
|
||||
padding: 1px 8px;
|
||||
border-radius: 20px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.cam-tabs .tab.active .count {
|
||||
|
||||
.cs-btn.active .cs-btn-count {
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.list-toolbar {
|
||||
/* Model Y Top-Down Car Graphic */
|
||||
.car-graphic {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
.list-toolbar select {
|
||||
background: var(--bg-tertiary);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text-secondary);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 6px 10px;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.clip-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
max-height: calc(100vh - 260px);
|
||||
overflow-y: auto;
|
||||
padding-right: 4px;
|
||||
}
|
||||
.clip-list::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
.clip-list::-webkit-scrollbar-thumb {
|
||||
background: var(--bg-elevated);
|
||||
border-radius: 10px;
|
||||
}
|
||||
.clip-list::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.cam-group-header {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
color: var(--text-muted);
|
||||
padding: 10px 4px 4px;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: var(--bg-primary);
|
||||
z-index: 2;
|
||||
}
|
||||
.cam-group-header a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: none;
|
||||
letter-spacing: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.cam-group-header a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.clip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 10px 12px;
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.clip:hover {
|
||||
background: var(--bg-tertiary);
|
||||
border-color: #3d3d44;
|
||||
transform: translateX(2px);
|
||||
}
|
||||
.clip.playing {
|
||||
border-color: var(--accent);
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgba(227, 25, 55, 0.12),
|
||||
var(--bg-tertiary)
|
||||
);
|
||||
}
|
||||
.clip .thumb {
|
||||
flex-shrink: 0;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 8px;
|
||||
background: var(--bg-tertiary);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: var(--accent);
|
||||
}
|
||||
.clip.playing .thumb {
|
||||
background: rgba(227, 25, 55, 0.15);
|
||||
}
|
||||
.clip .meta {
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
.clip .meta .fn {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.clip .meta .sub {
|
||||
font-size: 11.5px;
|
||||
color: var(--text-muted);
|
||||
margin-top: 2px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.clip .meta .sub .cam-pill {
|
||||
color: var(--text-secondary);
|
||||
background: var(--bg-tertiary);
|
||||
padding: 0 7px;
|
||||
border-radius: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.clip .play-ico {
|
||||
color: var(--text-muted);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.clip.playing .play-ico {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
padding: 40px 20px;
|
||||
color: var(--text-muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
.empty svg {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
opacity: 0.3;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.player-panel {
|
||||
position: static;
|
||||
}
|
||||
.clip-list {
|
||||
max-height: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 560px) {
|
||||
header {
|
||||
padding: 12px 16px;
|
||||
}
|
||||
.layout {
|
||||
padding: 14px 16px;
|
||||
}
|
||||
.brand small {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
.car-svg {
|
||||
width: 60px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
/* =============================================
|
||||
@@ -634,3 +416,57 @@ header {
|
||||
background: rgba(227, 25, 55, 0.08);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
/* =============================================
|
||||
Responsive
|
||||
============================================= */
|
||||
@media (max-width: 700px) {
|
||||
.cs-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.cs-col:first-child,
|
||||
.cs-col:last-child {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cs-col:nth-child(2) {
|
||||
flex-direction: row;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.car-graphic {
|
||||
order: -1;
|
||||
}
|
||||
|
||||
.car-svg {
|
||||
width: 40px;
|
||||
height: 140px;
|
||||
}
|
||||
|
||||
.cs-btn {
|
||||
min-width: 120px;
|
||||
font-size: 12px;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
header {
|
||||
padding: 12px 16px;
|
||||
}
|
||||
.layout {
|
||||
padding: 14px 16px;
|
||||
}
|
||||
.brand small {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
Reference in new issue
Block a user