Diffusers
MuseTalk1.5 / server /web /src /styles /global.css
Marcos
Add H.264 WebSocket streaming and React.js web interface
32bba92
Raw
History Blame Contribute Delete
4.02 kB
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
color: white;
}
#root {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.app-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
padding: 20px;
}
/* Avatar Section */
.avatar-section {
position: relative;
width: 400px;
height: 400px;
border-radius: 24px;
overflow: hidden;
background: #0f0f1a;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.avatar-section video,
.avatar-section canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 24px;
}
.avatar-section .idle-video {
z-index: 5;
}
.avatar-section .stream-video,
.avatar-section .stream-canvas {
z-index: 10;
opacity: 0;
transition: opacity 0.2s;
}
.avatar-section .stream-video.active,
.avatar-section .stream-canvas.active {
opacity: 1;
}
/* Status Bar */
.status-bar {
position: absolute;
top: 12px;
left: 12px;
display: flex;
gap: 8px;
z-index: 20;
flex-wrap: wrap;
}
.status-item {
background: rgba(0, 0, 0, 0.6);
padding: 4px 8px;
border-radius: 4px;
font-size: 11px;
display: flex;
align-items: center;
gap: 4px;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #666;
}
.status-dot.connected {
background: #4ade80;
}
.status-dot.streaming {
background: #60a5fa;
animation: pulse 1s infinite;
}
.status-dot.error {
background: #f87171;
}
.status-dot.warning {
background: #fbbf24;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* Controls */
.controls {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.record-btn {
width: 80px;
height: 80px;
border-radius: 50%;
border: none;
background: linear-gradient(145deg, #ef4444, #dc2626);
color: white;
font-size: 14px;
font-weight: 600;
cursor: pointer;
box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
transition: all 0.2s;
}
.record-btn:hover {
transform: scale(1.05);
}
.record-btn:active,
.record-btn.recording {
background: linear-gradient(145deg, #dc2626, #b91c1c);
transform: scale(0.95);
}
.record-btn:disabled {
background: #666;
cursor: not-allowed;
box-shadow: none;
}
/* Response Text */
.response-text {
text-align: center;
font-size: 16px;
color: #94a3b8;
max-width: 400px;
min-height: 48px;
}
/* Stats */
.stats {
display: flex;
gap: 16px;
font-size: 13px;
color: #64748b;
flex-wrap: wrap;
justify-content: center;
}
.stats span {
font-weight: 600;
color: #94a3b8;
}
/* Mode Badge */
.mode-badge {
padding: 6px 16px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
}
.mode-badge.webrtc {
background: #22c55e;
color: white;
}
.mode-badge.h264 {
background: #8b5cf6;
color: white;
}
.mode-badge.jpeg {
background: #f59e0b;
color: white;
}
.mode-badge.detecting {
background: #64748b;
color: white;
}
/* Mode Info */
.mode-info {
font-size: 11px;
color: #64748b;
text-align: center;
max-width: 350px;
}
/* Navigation */
.nav-bar {
position: fixed;
top: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.8);
padding: 12px 24px;
display: flex;
justify-content: center;
gap: 16px;
z-index: 100;
}
.nav-link {
color: #94a3b8;
text-decoration: none;
padding: 8px 16px;
border-radius: 8px;
font-size: 14px;
transition: all 0.2s;
}
.nav-link:hover {
background: rgba(255, 255, 255, 0.1);
color: white;
}
.nav-link.active {
background: #8b5cf6;
color: white;
}
/* Responsive */
@media (max-width: 480px) {
.avatar-section {
width: 300px;
height: 300px;
}
.stats {
gap: 8px;
font-size: 11px;
}
}