J Z commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -399,7 +399,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;backgrou
|
|
| 399 |
.video-section{position:relative;width:100%;min-height:300px;max-height:45vh;background:#000;border-radius:12px;overflow:hidden;flex-shrink:0;display:flex;align-items:center;justify-content:center}
|
| 400 |
.video-container{position:relative;width:100%;height:100%}
|
| 401 |
.video-container video{width:100%;height:100%;object-fit:contain;display:block}
|
| 402 |
-
#videoA,#videoB{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain;transition:opacity
|
| 403 |
#videoA{z-index:1;opacity:1}#videoB{z-index:0;opacity:1}
|
| 404 |
.video-status{position:absolute;bottom:8px;right:12px;font-size:.7rem;color:rgba(255,255,255,.4);background:rgba(0,0,0,.5);padding:2px 8px;border-radius:4px;z-index:10}
|
| 405 |
.chat-section{flex:1;display:flex;flex-direction:column;min-height:0;background:rgba(15,23,42,.6);border:1px solid rgba(59,130,246,.15);border-radius:12px;overflow:hidden}
|
|
@@ -491,7 +491,7 @@ function crossfadeTo(url, muted){
|
|
| 491 |
currentVideo=currentVideo==='A'?'B':'A';
|
| 492 |
isTransitioning=false;
|
| 493 |
resolve();
|
| 494 |
-
},
|
| 495 |
}).catch(()=>{
|
| 496 |
next.muted=true;
|
| 497 |
next.play().then(()=>{
|
|
|
|
| 399 |
.video-section{position:relative;width:100%;min-height:300px;max-height:45vh;background:#000;border-radius:12px;overflow:hidden;flex-shrink:0;display:flex;align-items:center;justify-content:center}
|
| 400 |
.video-container{position:relative;width:100%;height:100%}
|
| 401 |
.video-container video{width:100%;height:100%;object-fit:contain;display:block}
|
| 402 |
+
#videoA,#videoB{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain;transition:opacity 75ms ease}
|
| 403 |
#videoA{z-index:1;opacity:1}#videoB{z-index:0;opacity:1}
|
| 404 |
.video-status{position:absolute;bottom:8px;right:12px;font-size:.7rem;color:rgba(255,255,255,.4);background:rgba(0,0,0,.5);padding:2px 8px;border-radius:4px;z-index:10}
|
| 405 |
.chat-section{flex:1;display:flex;flex-direction:column;min-height:0;background:rgba(15,23,42,.6);border:1px solid rgba(59,130,246,.15);border-radius:12px;overflow:hidden}
|
|
|
|
| 491 |
currentVideo=currentVideo==='A'?'B':'A';
|
| 492 |
isTransitioning=false;
|
| 493 |
resolve();
|
| 494 |
+
}, 105); // slightly longer than CSS transition
|
| 495 |
}).catch(()=>{
|
| 496 |
next.muted=true;
|
| 497 |
next.play().then(()=>{
|